Symptoms
- After an update or an upgrade (to 22.04 or 22.10), poller warns as follows:
- And the broker logs returns errors as follows:
[2022-08-22T15:30:40.917+02:00] [sql] [error] mysql_connection: could not store service: Out of range value for column 'notification_number' at row 1
[2022-08-22T15:30:40.917+02:00] [core] [error] failover: global error: could not store service: Out of range value for column 'notification_number' at row 1
Problem
When a host or service has a non-ok status for a while, centreon-broker keeps incrementing the notification_number
until it reaches 32767, which is a maximum value.
Solution
You need to change the type of the column to allow centreon-broker to insert larger values.
- Log into your terminal and connect to MySQL:
mysql -udatabase_user -p
- Run these queries:
UPDATE centreon_storage.hosts SET notification_number=0 WHERE notification_number < 0;
UPDATE centreon_storage.services SET notification_number=0 WHERE notification_number < 0;
ALTER TABLE centreon_storage.hosts MODIFY notification_number bigint(20) unsigned DEFAULT NULL;
ALTER TABLE centreon_storage.services MODIFY notification_number bigint(20) unsigned DEFAULT NULL;
- After 20 minutes, check the last update in the Centreon interface in the Configuration > Pollers menu.
If it is still warning
- Check the
/var/log/centreon-broker/central-broker-master.log
file.
If the error still appears
- Restart cbd on the central:
systemctl restart cbd