Page 1 of 1

Notification SQL error ndoutils

Posted: Thu Nov 18, 2021 7:46 am
by nagios-retail
Hello,

We are getting the following error within the Notification screen:

SQL Error [ndoutils] : Incorrect file format 'nagios_contactnotificationmethods'

Nagios is version 5.8.7
CentOS Linux 7.9.2009

Re: Notification SQL error ndoutils

Posted: Thu Nov 18, 2021 2:38 pm
by tgriep
The MYSQL table is corrupted and needs to be repaired.

Run these commands to stop the processes, clean and repair the SQL database and to restart the processes. Run them all as root in a ssh session on the Nagios server.

Code: Select all

systemctl stop npcd
systemctl stop nagios
systemctl stop crond
pkill -9 -u nagios
echo "truncate table xi_events; truncate table xi_meta; truncate table xi_eventqueue;" | mysql -u root -pnagiosxi nagiosxi
mysqlcheck -f -r -u root -pnagiosxi --all-databases --use-frm
systemctl restart mariadb
rm -f /usr/local/nagios/var/rw/nagios.cmd
rm -f /usr/local/nagios/var/nagios.lock
rm -f /var/run/nagios.lock
rm -f /usr/local/nagios/var/ndo.sock
rm -f /usr/local/nagios/var/ndo2db.lock
rm -f /var/lib/mrtg/mrtg_l
rm -f /usr/local/nagiosxi/var/*.lock
rm -f /usr/local/nagiosxi/tmp/*.lock
for i in `ipcs -q | grep nagios |awk '{print $2}'`; do ipcrm -q $i; done
pkill python
systemctl restart httpd
systemctl start nagios
systemctl start npcd
systemctl start crond
Then see if the message is gone in the XI interface.

Thank you.

Re: Notification SQL error ndoutils

Posted: Thu Nov 18, 2021 2:39 pm
by benjaminsmith
Hi,

Let's go ahead and run a repair on the database as a first step and let me know if that resolves the issue. Please log in to the CLI and run the following command as root.

Code: Select all

mysqlcheck -r -f -u root -pnagiosxi --use_frm --all-databases
If that does not take care of it, let's get a fresh system profile to review. Thanks, Benjamin
To send us your system profile.
Login to the Nagios XI GUI using a web browser.
Click the "Admin" > "System Profile" Menu
Click the "Download Profile" button

Re: Notification SQL error ndoutils

Posted: Wed Nov 24, 2021 10:10 am
by nagios-retail
Hello,

Notifications are back up after running the commands from the first post.
Had to preform this on 2 Nagios servers.

Thx for the help.

Re: Notification SQL error ndoutils

Posted: Wed Nov 24, 2021 11:23 am
by benjaminsmith
Hi,

That's good to hear and appreciate the follow-up.

We'll go ahead and close this out, but feel free to open another if you have any new questions.

--Benjamin