nagios_downtimehistory is marked as crashed
Posted: Thu Jul 23, 2020 10:53 am
Hi. Running NagiosXi 5.6.14. System is crashing with mysql failures trying to update the 'Table './nagios/nagios_downtimehistory'. We have a large number of servers (800+) that are in a reoccurring downtime. When the downtime stops (and starts) we are getting over 18,900+ errors in the /var/log/mariadb/mariadb.log log file and the /var/log/messages files. When it occurs, the systems total memory is used and will crash.
To temporary resolve the error is to rerun the database repair script. From past issues it seem the everytime a downtime starts or ends for a server their is a failure for the /nagios/nagios_downtimehistory.
As a side note, this issue occurred last month also and I was requested to add max_connections = 1000 and open_files_limit = 4096 to the /etc/my.cnf file. I had to remove these entries because when the system was restarted after it crash, it would run out of memory within 10 minutes causing a hard reboot.
Below are samples of the errors:
From the mariadb.log file:
200723 11:30:37 [ERROR] mysqld: Table './nagios/nagios_downtimehistory' is marked as crashed and last (automatic?) repair failed.
from the messages log file:
Jul 22 23:02:34 bcnagios01 ndo2db: mysql_error: 'Table './nagios/nagios_downtimehistory' is marked as crashed and last (automatic?) repair failed'
Jul 22 23:02:35 bcnagios01 ndo2db: Error: mysql_query() failed for 'UPDATE nagios_downtimehistory SET actual_start_time=FROM_UNIXTIME(1595473200), actual_start_time_usec='952661', was_started='1' WHERE instance_id='1' AND downtime_type='1' AND object_id='6263' AND entry_time=FROM_UNIXTIME(1594954867) AND scheduled_start_time=FROM_UNIXTIME(1595473200) AND scheduled_end_time=FROM_UNIXTIME(1595493000)'
Jul 22 23:02:35 bcnagios01 ndo2db: mysql_error: 'Table './nagios/nagios_downtimehistory' is marked as crashed and last (automatic?) repair failed'
Jul 22 23:02:35 bcnagios01 ndo2db: Error: mysql_query() failed for 'UPDATE nagios_downtimehistory SET actual_start_time=FROM_UNIXTIME(1595473200), actual_start_time_usec='961094', was_started='1' WHERE instance_id='1' AND downtime_type='2' AND object_id='10606' AND entry_time=FROM_UNIXTIME(1594954872) AND scheduled_start_time=FROM_UNIXTIME(1595473200) AND
To temporary resolve the error is to rerun the database repair script. From past issues it seem the everytime a downtime starts or ends for a server their is a failure for the /nagios/nagios_downtimehistory.
As a side note, this issue occurred last month also and I was requested to add max_connections = 1000 and open_files_limit = 4096 to the /etc/my.cnf file. I had to remove these entries because when the system was restarted after it crash, it would run out of memory within 10 minutes causing a hard reboot.
Below are samples of the errors:
From the mariadb.log file:
200723 11:30:37 [ERROR] mysqld: Table './nagios/nagios_downtimehistory' is marked as crashed and last (automatic?) repair failed.
from the messages log file:
Jul 22 23:02:34 bcnagios01 ndo2db: mysql_error: 'Table './nagios/nagios_downtimehistory' is marked as crashed and last (automatic?) repair failed'
Jul 22 23:02:35 bcnagios01 ndo2db: Error: mysql_query() failed for 'UPDATE nagios_downtimehistory SET actual_start_time=FROM_UNIXTIME(1595473200), actual_start_time_usec='952661', was_started='1' WHERE instance_id='1' AND downtime_type='1' AND object_id='6263' AND entry_time=FROM_UNIXTIME(1594954867) AND scheduled_start_time=FROM_UNIXTIME(1595473200) AND scheduled_end_time=FROM_UNIXTIME(1595493000)'
Jul 22 23:02:35 bcnagios01 ndo2db: mysql_error: 'Table './nagios/nagios_downtimehistory' is marked as crashed and last (automatic?) repair failed'
Jul 22 23:02:35 bcnagios01 ndo2db: Error: mysql_query() failed for 'UPDATE nagios_downtimehistory SET actual_start_time=FROM_UNIXTIME(1595473200), actual_start_time_usec='961094', was_started='1' WHERE instance_id='1' AND downtime_type='2' AND object_id='10606' AND entry_time=FROM_UNIXTIME(1594954872) AND scheduled_start_time=FROM_UNIXTIME(1595473200) AND