Page 1 of 1

Multiple Tables Corrupted Issue

Posted: Thu May 09, 2024 5:44 am
by kenneth59
Hi Nagios Support Team,

I recently encountered an issue similar to the one discussed in this forum post: viewtopic.php?p=32199. It appears that multiple tables in my Nagios system are corrupted.

Could you please advise on the best solution for addressing this situation?

Re: Multiple Tables Corrupted Issue

Posted: Thu May 09, 2024 9:33 am
by gwesterman
Hi @kenneth59,

What lead you to believe that multiple tables are corrupted? Are you getting any errors? Please provide additional context so we can better address your issue.

Thank you!

Re: Multiple Tables Corrupted Issue

Posted: Thu May 09, 2024 3:19 pm
by sgardil
Also have you tried our database repair script? That tends to be on of the first easy things to check to see if it fixes your issues with our databases. You can run the script at `/usr/local/nagiosxi/scripts/repair_databases.sh` if you havent tried it already. Otherwise like mentioned above some more information would be helpful in diagnosing the issue.

Re: Multiple Tables Corrupted Issue

Posted: Thu May 09, 2024 8:56 pm
by kenneth59
Hi, Sorry for the lack of context. Below are the things I have tried before posting this issue.

1. Use ./repair_databases.sh by following the instruction here https://support.nagios.com/kb/article/n ... es-24.html
cd /usr/local/nagiosxi/scripts/
./repair_databases.sh

Result: Not fixed


2. Notice an error message similar to "SQL: SQL Error [ndoutils] : Table 'nagios_programstatus' is read onlyEntry" I also tried the following method mention in the previous link.
systemctl stop mysqld.service
cd /var/lib/mysql/nagios
myisamchk -r -f nagios_<corrupted_table>
systemctl start mysqld.service
rm -f /usr/local/nagiosxi/var/dbmaint.lock
php /usr/local/nagiosxi/cron/dbmaint.php

Result: Not fixed "SQL: SQL Error [ndoutils] :" error persist.


3. The last things I have tried is to follow the steps mention in this link viewtopic.php?p=32199. This method help to resolve the "SQL: SQL Error [ndoutils] : Table 'nagios_programstatus' is read onlyEntry" error displayed in UI. but all the configuration is gone so I attempt to import commands.cfg to nagiosxi by running ./reconfigure_nagios.sh but the script failed because "Table 'tbl_command' is read onlyEntry" this is why I suspect that the issue is due to multiple table corrupted.