Notifications Issue

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
omarrrthepirate
Posts: 28
Joined: Fri Jul 09, 2021 1:13 pm
Location: Spokane, WA
Contact:

Notifications Issue

Post by omarrrthepirate »

I just logged in as Nagios Admin and saw the following error:

SQL Error [ndoutils] : Table './nagios/nagios_contactnotifications' is marked as crashed and last (automatic?) repair failed

How can I fix this? Should I also run a repair of the Nagios Database?

Why would it crash?

I worry about the stability of Nagios XI sometimes. Of course I'm still new to it though.
Omarrr The Pirate!
Arrrrr
gsmith
Posts: 1253
Joined: Tue Mar 02, 2021 11:15 am

Re: Notifications Issue

Post by gsmith »

Hi

Please manually perform a database repair as shown in:
https://assets.nagios.com/downloads/nag ... tabase.pdf

Look at the first topic in the Troubleshooting section as it matches your error message, but with a different table:
Troubleshooting
If you receive an error, similar to this one:
SQL: DELETE FROM nagios_logentries WHERE logentry_time < FROM_UNIXTIME(1293570334)
SQL: SQL Error [ndoutils] :</b> Table './nagios/nagios_logentries' is marked as
crashed and last (automatic?) repair failedCLEANING ndoutils TABLE 'notifications'...
You may need to run a force repair on the tables:
service mysqld stop
cd /var/lib/mysql/nagios
myisamchk -r -f nagios_<corrupted_table>
service mysqld start
rm -f /usr/local/nagiosxi/var/dbmaint.lock
php /usr/local/nagiosxi/cron/dbmaint.php
Please read through the whole document before taking any actions, and backing up your database should be
your first action.

You should also check the diskspace of the volume the db resides on.

Let me know how you make out.

Thanks
omarrrthepirate
Posts: 28
Joined: Fri Jul 09, 2021 1:13 pm
Location: Spokane, WA
Contact:

Re: Notifications Issue

Post by omarrrthepirate »

The repair seemed to work, but now I get this message:

[root@localhost nagios]# service mysqld start
Redirecting to /bin/systemctl start mysqld.service
Failed to start mysqld.service: Unit not found.

Mysqld.service is not found? How is this product even running LOL? How do I fix this now?

Thank you for all the help; I really appreciate you folks.
Omarrr The Pirate!
Arrrrr
gsmith
Posts: 1253
Joined: Tue Mar 02, 2021 11:15 am

Re: Notifications Issue

Post by gsmith »

Hi

You may be running MariaDB (a flavor of MySql).

To find out you can run:

Code: Select all

systemctl status | grep mysql
systemctl status | grep maria
You'll get hits on both if the db is mariadb.

You can also run:

Code: Select all

systemctl list-units --type=service
But you'd have to know that you are looking for mariadb.service

Maybe the best way is:

Code: Select all

systemctl list-units --type=service | grep db.service
Thanks
Locked