Multiple Tables Corrupted Issue

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Post Reply
kenneth59
Posts: 9
Joined: Tue Apr 16, 2024 10:03 pm

Multiple Tables Corrupted Issue

Post 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?
gwesterman
Posts: 107
Joined: Wed Aug 23, 2023 11:29 am

Re: Multiple Tables Corrupted Issue

Post 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!
sgardil
Posts: 155
Joined: Wed Aug 09, 2023 9:58 am

Re: Multiple Tables Corrupted Issue

Post 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.
kenneth59
Posts: 9
Joined: Tue Apr 16, 2024 10:03 pm

Re: Multiple Tables Corrupted Issue

Post 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.
Post Reply