database corruption not fixed by the repair script

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
Chris Hardick
Posts: 33
Joined: Mon Mar 25, 2019 5:40 am

database corruption not fixed by the repair script

Post by Chris Hardick »

Hi

I am running Nagios XI 5.6.2 from VMWare on Windows 10 PC, currently only monitoring a single windows 10 PC as we finalise configurations.

The monitoring PC was subject to a power cycle and it now appears the Nagios DB is corrupt and the standard repair script fails.
error seen on Nagios is
SQL Error [ndoutils]: incorrect File format 'nagios_service_status'
dbrepair.log
the script does output 5 lines indicating a particular table is not a MyISAM-table, they are:
nagios_eventhandlers
nagios_logentries
nagios_notifications
nagios_servicestatus
nagios_systemcommands
full example:
myisamchk: error: 'nagios_eventhandlers' is not a MyISAM-table

NOTE that the warning text does not include .MYI as per nagios database repair guide which would have indicated they were of the wrong format and needed to be converted.

This instance of Nagios has been running for about 2 months, and was created using the 5.6.2 VM, it hasnt been updated except for a plugin.

Thanks for your help

Chris
You do not have the required permissions to view the files attached to this post.
User avatar
mbellerue
Posts: 1403
Joined: Fri Jul 12, 2019 11:10 am

Re: database corruption not fixed by the repair script

Post by mbellerue »

Hi Chris,

Can you give me the output of this command?

Code: Select all

ls -lh /var/lib/mysql/
The fact that 5 of the tables aren't reporting as MyISAM, and 2 critical databases are missing has me worried that there is actual lost data here.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
Chris Hardick
Posts: 33
Joined: Mon Mar 25, 2019 5:40 am

Re: database corruption not fixed by the repair script

Post by Chris Hardick »

Hi

output is as follows
directory list.PNG
Thanks

Chris
You do not have the required permissions to view the files attached to this post.
User avatar
mbellerue
Posts: 1403
Joined: Fri Jul 12, 2019 11:10 am

Re: database corruption not fixed by the repair script

Post by mbellerue »

Okay, the directories for those databases are there. That's good. We should check to make sure that the database files exist as well.

Code: Select all

ls -lh /var/lib/mysql/nagiosql/
ls -lh /var/lib/mysql/nagiosxi/
Let's also check to make sure that they've been imported into MySQL.

Code: Select all

mysql -u root
show databases;
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked