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.
Notifications Issue
-
omarrrthepirate
- Posts: 28
- Joined: Fri Jul 09, 2021 1:13 pm
- Location: Spokane, WA
- Contact:
Notifications Issue
Omarrr The Pirate!
Arrrrr
Arrrrr
Re: Notifications Issue
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:
your first action.
You should also check the diskspace of the volume the db resides on.
Let me know how you make out.
Thanks
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:
Please read through the whole document before taking any actions, and backing up your database should beTroubleshooting
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
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
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.
[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
Arrrrr
Re: Notifications Issue
Hi
You may be running MariaDB (a flavor of MySql).
To find out you can run:
You'll get hits on both if the db is mariadb.
You can also run:
But you'd have to know that you are looking for mariadb.service
Maybe the best way is:
Thanks
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 mariaYou can also run:
Code: Select all
systemctl list-units --type=serviceMaybe the best way is:
Code: Select all
systemctl list-units --type=service | grep db.service