Hi all,
I found that 2 tables in Nagios XI database are crashed , respectively nagios_externalcommands and nagios_notifications
I have tried the procedure founded at this link http://assets.nagios.com/downloads/nagi ... tabase.pdf
I have ran the following command
service nagios stop
service mysqld stop
cd /var/lib/mysql/nagios
myisamchk -r -f nagios_externalcommands.MYI
myisamchk -r -f nagios_notifications.MYI
service mysqld start
service nagios start
rm -f /usr/local/nagiosxi/var/dbmaint.lock
/usr/local/nagiosxi/cron/dbmaint.php
After restarting mysql and nagios I saw that the problem is not resolved
Any suggestions?
Thanks
Problem with repairing NagiosXI database
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Problem with repairing NagiosXI database
You don't need to touch any services to run the database repair scripts, the repair script should take care of this, what does the following output, please attach the text file output that should be in /tmp/:
Also, what does the following show:
Code: Select all
/usr/local/nagiosxi/scripts/repairmysql.sh nagiosql /tmp/nagiosqlrepair
/usr/local/nagiosxi/scripts/repairmysql.sh nagios > /tmp/nagiosrepair
Code: Select all
tail -30 /var/log/mysqld.logRe: Problem with repairing NagiosXI database
I have fixed it. The problem was that tmp directory was missing (maybe someone delete it for mistake) and the myisamchk command could not create a temporary file for restoring the table. I have created the /tmp dir and executed the 2 commands again:
myisamchk -r -f nagios_externalcommands.MYI
myisamchk -r -f nagios_notifications.MYI
Now MySQL log file are clean .Everything seems fine
Thank you
myisamchk -r -f nagios_externalcommands.MYI
myisamchk -r -f nagios_notifications.MYI
Now MySQL log file are clean .Everything seems fine
Thank you
Re: Problem with repairing NagiosXI database
Sounds good. I will be closing this thread now.
Former Nagios employee