Event Log is empty

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
ahoward12
Posts: 137
Joined: Thu Jan 05, 2017 10:24 am

Event Log is empty

Post by ahoward12 »

Hey Everyone, about once every 2 months my event log for my Nagios XI server is empty. It usually turns out there a bunch of errors like below:

[root@NAGIOS ~]# tail -50 /var/log/mysqld.log
170615 7:25:14 [ERROR] /usr/libexec/mysqld: Table './nagios/nagios_logentries' is marked as crashed and last (automatic?) repair failed


So then I go and run the repair script:

/usr/local/nagiosxi/scripts/repair_databases.sh​

Annoying yes, but it usually works just fine. When I tried to run it today, is said the script didn't exist. I went to the directory and the script IS there. If I try and run it, it says the repair_databases.sh is a directory. If I try to change my working directory to that, it says that it isn't a directory. The permissions are correct on it as well.

Can I get a copy of the repair_databases.sh file to drop another one in there?

Nagios XI 5.4.4
CentoOS 6.8
VMware
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Event Log is empty

Post by lmiltchev »

Here you go:
repair_databases.zip
Unzip the file, and place it in the /usr/local/nagiosxi/scripts directory. Set ownership/permissions as nagios:nagios 755.

You can also try running one of the following command in order to fix the db errors:

Code: Select all

mysqlcheck -r -f -uroot -pnagiosxi --all-databases
mysqlcheck --repair --use-frm -pnagiosxi --all-databases
You do not have the required permissions to view the files attached to this post.
Be sure to check out our Knowledgebase for helpful articles and solutions!
ahoward12
Posts: 137
Joined: Thu Jan 05, 2017 10:24 am

Re: Event Log is empty

Post by ahoward12 »

Put the new one in there and ran it. Problem resolved. Thank you
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Event Log is empty

Post by lmiltchev »

Great! Is it OK if we close this topic?
Be sure to check out our Knowledgebase for helpful articles and solutions!
ahoward12
Posts: 137
Joined: Thu Jan 05, 2017 10:24 am

Re: Event Log is empty

Post by ahoward12 »

Yes, close it. I apologize I thought it was already closed.
Locked