Today I got the error message:
Error: Could not stat() command file '/var/spool/nagios/cmd/nagios.cmd'! The external command file may be missing, Nagios may not be running, and/or Nagios may not be checking external commands. An error occurred while attempting to commit your command for processing.
-rw-r--r-- 1 root root 11436 Jul 22 2015 cgi.cfg -rw-rw-r-- 1 root root 12988 Oct 4 13:07 cgi.cfg.rpmnew -rw-r--r-- 1 root root 44623 Nov 19 09:02 nagios.cfg -rw-rw-r-- 1 root root 44662 Oct 4 13:07 nagios.cfg.rpmnew
diff nagios.cfg nagios.cfg.rpmnew < temp_file=/var/spool/nagios/nagios.tmp --- > temp_file=/var/log/nagios/nagios.tmp
I’ve been Nagios since v2.x on the same server, and performing upgrades once a year or as needed. So you can see I has some serious legacy files hanging out. So, I found a few other files needed to be adjusted, also copied this file to it’s new location to match the rpmnew config file which I put into place.
cp -pr /var/log/nagios/objects.cache /var/spool/nagios/objects.cache
service nagios configcheck
I found some additional errors that had to do with differences between my old and new configs. Those were quickly fixable, did one final restart and everything looks to be back to normal.
I’m now able to Acknowledge that pesky alert that has been nagging me every 30 minutes for the last 2 days.