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
Event Log is empty
Re: Event Log is empty
Here you go:
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:
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-databasesYou 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!
Re: Event Log is empty
Put the new one in there and ran it. Problem resolved. Thank you
Re: Event Log is empty
Great! Is it OK if we close this topic?
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Event Log is empty
Yes, close it. I apologize I thought it was already closed.