Question

23.04 table ressources and services not similar

  • 29 April 2023
  • 1 reply
  • 82 views

Userlevel 2
Badge +7

Hi,

I executed the 22.10 to 23.04 upgrade.

Some statuses are not consistent between the resources table and the services table.
As a result, the resources status screens do not report errors while the bubbles at the top detect anomalies.

For exemple :
 

MariaDB [centreon_storage]> SELECT NOW(), host_id, service_id, description, state FROM services WHERE service_id = 1041;
+---------------------+---------+------------+-----------------------+-------+
| NOW() | host_id | service_id | description | state |
+---------------------+---------+------------+-----------------------+-------+
| 2023-04-29 17:34:13 | 83 | 1041 | X509-Expiration-HTTPs | 1 |
+---------------------+---------+------------+-----------------------+-------+
1 row in set (0.001 sec)

MariaDB [centreon_storage]> SELECT NOW(), parent_id, id, name, status FROM resources WHERE id = 1041;
+---------------------+-----------+------+-----------------------+--------+
| NOW() | parent_id | id | name | status |
+---------------------+-----------+------+-----------------------+--------+
| 2023-04-29 17:35:12 | 83 | 1041 | X509-Expiration-HTTPs | 0 |
+---------------------+-----------+------+-----------------------+--------+

The command line return an OK state.

[root@central centreon-engine]# /usr/lib/centreon/plugins//centreon_protocol_x509.pl --plugin=apps::protocols::x509::plugin --mode=certificate --custommode='tcp' --hostname='XXXXX' --port=443 --warning-status='%{expiration} < 15' --critical-status='%{expiration} < 5' --ssl-opt="SSL_verify_mode => SSL_VERIFY_NONE"
OK: Certificate for 'XXXX' expires in '54' days [2023-06-22T18:23:38Z] - Issuer: 'YYYY'
[root@central centreon-engine]# echo $?
0

 


1 reply

Userlevel 4
Badge +12

Hi @Pascal,

When looking at your database extracts, I can figure one scenario where it would be normal:

  • your SSL certificate is in the warning zone (it will expire soon)
  • the result at 17:34:13 is WARNING and a recheck will be performed at 17:35:13
  • in the meantime, someone or an auto-remediation process (event handler) has generated a new certificate, resulting in an OK state when it’s rechecked
  • an important system load on the database makes Broker slow to insert the data and resources table is updated before services
  • if you rerun your queries later, the two statuses and last check should be the same

Do you have persistent issues of this kind? How many services do you monitor? With what value for “normal_check_interval”?

Reply