Your Nagios server was shutoff unexpectedly and now you see the “database backend” with a red exclamation in the web GUI. The only thing you can do is try to start the process, but it comes back with ndo2db is not running.
Fortunately, the fix is pretty simple. Feel free to copy/paste the commands to avoid typos. Just make sure you omit the ‘#’ on each command otherwise the command won’t run. Assuming you have already tried restarting the ndo2db service, go to the command-line and verify it is not running.
# service ndo2db status ndo2db is not running
Still on the command-line, stop the nagios service so you don’t mess anything else up in the process.
# service nagios stop
Run the ‘ls’ command and you should see something similar to what is below (minus the dates of course).
# ls -l /usr/local/nagios/var/ndo* -rw-r--r-- 1 nagios nagios 0 Oct 18 09:02 /usr/local/nagios/var/ndo2db.debug -rw-r--r-- 1 nagios nagios 6 Oct 23 10:13 /usr/local/nagios/var/ndo2db.lock -rw-r--r-- 1 nagios nagios 0 Nov 12 12:43 /usr/local/nagios/var/ndomod.tmp srwxr-xr-x 1 nagios nagios 0 Oct 23 10:13 /usr/local/nagios/var/ndo.sock
Now rename/move the two files using the commands below.
# mv /usr/local/nagios/var/ndo2db.lock /usr/local/nagios/var/ndo2db.lock.bak # mv /usr/local/nagios/var/ndo.sock /usr/local/nagios/var/ndo.sock.bak
Now, just restart your nagios service and ndo2db service using the commands below.
# service nagios start # service ndo2db start
Run the service status command to verify it is now running. You should see the red exclamation change in the web status as well. Voila!
# service ndo2db status ndo2db (pid 3047) is running...
Dallas Haselhorst has worked as an IT and information security consultant for over 20 years. During that time, he has owned his own businesses and worked with companies in numerous industries. Dallas holds several industry certifications and when not working or tinkering in tech, he may be found attempting to mold his daughters into card carrying nerds and organizing BSidesKC.
The post Nagios – ndo2db not running appeared first on Linux Included.