Table nagios_notifications crashed and auto repair failed

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
xlin125
Posts: 172
Joined: Mon Jan 19, 2015 6:01 pm

Table nagios_notifications crashed and auto repair failed

Post by xlin125 »

We have Nagios XI 2014R2.7 and Nagios XI 5.2.3 on Redhat 6.7 systems. We noticed the following error in the mysqld.log, and on Nagios XI web interface when selecting "Notifications" under "Home->Incident Management":
In the mysqld.log:
161001 10:57:38 [ERROR] //opt/app/mysql/bin/mysqld: Table './nagios/nagios_notifications' is marked as crashed and last (automatic?) repair failed

On Nagios XI Web Interface:
SQL: SQL Error [ndoutils] : Table './nagios/nagios_notifications' is marked as crashed and last (automatic?) repair failed

How can I fix this problem? I am not sure what/how "last (automatic?) repair" was done? Should I try to run /usr/local/nagiosxi/scripts/repair_databases.sh? What other tools/scripts that I can run to fix this problem? Thanks!
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Table nagios_notifications crashed and auto repair faile

Post by lmiltchev »

Run the db repair script:

Code: Select all

cd /usr/local/nagiosxi/scripts
./repair_databases.sh
If this doesn't help, you can try:

Code: Select all

mysqlcheck -r -f -uroot -pnagiosxi --all-databases
If this doesn't fix the issue either, run:

Code: Select all

echo 'repair table nagios_notifications use_frm;' | mysql -t -u root -pnagiosxi nagios
service mysqld restart
Let us know if this helped.
Be sure to check out our Knowledgebase for helpful articles and solutions!
xlin125
Posts: 172
Joined: Mon Jan 19, 2015 6:01 pm

Re: Table nagios_notifications crashed and auto repair faile

Post by xlin125 »

The script repair_databases.sh helped repair the table "nagios_notifications'. Thanks!
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Table nagios_notifications crashed and auto repair faile

Post by rkennedy »

Awesome, are we good to mark this thread as resolved?
Former Nagios Employee
Locked