Error: Could not stat() command file '/var/lib/nagios3/rw/nagios.cmd'!In order to fix it, do the following actions:
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.
Check that /etc/nagios3/nagios.cfg has:
Also check that
command_check_interval=15s is uncommented and
command_check_interval=-1 is commented like this:
command_check_interval=15sCheck the path for command_file is OK. It usually looks like this:
command_file=/var/lib/nagios3/rw/nagios.cmdMake sure that the user www-data is part of the nagios group - this is located in /etc/group
Check permissions on the command file that we looked at above:
# ls -l /var/lib/nagios3/rw/nagios.cmdIf it looks like this, we're good.
prw-rw---- 1 nagios nagios 0 Mar 7 11:56 /var/lib/nagios3/rw/nagios.cmd
The next thing to check is that the directory that nagios.cmd resides in has executable rights for the nagios group:
# ls -l /var/lib/nagios3/Uh oh - rw has no group rights! Fix it with this command:
-rw------- 1 nagios www-data 176049 Mar 7 11:58 retention.dat
drwx------ 2 nagios www-data 4096 Mar 7 11:56 rw
drwxr-x--- 3 nagios nagios 4096 Jun 14 2013 spool
# chmod g+x /var/lib/nagios3/rwand then
# service nagios3 restartAnd the crowd goes wild!