Nagios DB repair failed... now what?
Posted: Thu Oct 06, 2011 7:20 pm
I am new to Nagios XI and still learning the ropes. Today I decided I would reboot my virtual machine to make sure I understood how that worked. Unfortunately, something must have gone wrong because when I brought Nagios back up I was getting lots of Nagios system errors. I noticed that the mysqld daemon was taking nearly 100% of the CPU so I checked logs and found that mysql was complaining about 3 corrupted tables. I followed the instructions in the http://assets.nagios.com/downloads/nagi ... tabase.pdf document and still got the following error when running /usr/local/nagiosxi/cron/dbmaint.php:
SQL: DELETE FROM nagios_hostchecks WHERE start_time < FROM_UNIXTIME(1317944940)
SQL: SQL Error [ndoutils] :</b> Table './nagios/nagios_hostchecks' is marked as crashed and last (automatic?) repair failedCLEANING ndoutils TABLE 'eventhandlers'...
The document said to contact support if a similar error was encountered so that is the purpose of this email. I am not sure what to do next. The document says it might be necessary to truncate some files but I'm not sure how I would recover the lost data.
Also, is there a way to properly shutdown the VM without clobbering the DB? Thanks!!
SQL: DELETE FROM nagios_hostchecks WHERE start_time < FROM_UNIXTIME(1317944940)
SQL: SQL Error [ndoutils] :</b> Table './nagios/nagios_hostchecks' is marked as crashed and last (automatic?) repair failedCLEANING ndoutils TABLE 'eventhandlers'...
The document said to contact support if a similar error was encountered so that is the purpose of this email. I am not sure what to do next. The document says it might be necessary to truncate some files but I'm not sure how I would recover the lost data.
Also, is there a way to properly shutdown the VM without clobbering the DB? Thanks!!