Page 1 of 1

Event Log is empty

Posted: Thu Jun 15, 2017 7:28 am
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

Re: Event Log is empty

Posted: Thu Jun 15, 2017 9:55 am
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

Re: Event Log is empty

Posted: Thu Jun 15, 2017 12:20 pm
by ahoward12
Put the new one in there and ran it. Problem resolved. Thank you

Re: Event Log is empty

Posted: Thu Jun 15, 2017 1:48 pm
by lmiltchev
Great! Is it OK if we close this topic?

Re: Event Log is empty

Posted: Tue Jul 11, 2017 9:46 am
by ahoward12
Yes, close it. I apologize I thought it was already closed.