Jan 292015
 

On a fresh nagios installation in Debian I received the following error, when trying to schedule a task:

Error: Could not stat() command file ‘/var/lib/nagios3/rw/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.

It seems that others had the same problem and the debian package is not fully working here. It lacks the right permissions on /var/lib/nagios3/, but you can fix it like this:

service nagios3 stop
dpkg-statoverride --update --add nagios www-data 2710 /var/lib/nagios3/rw
dpkg-statoverride --update --add nagios nagios 751 /var/lib/nagios3
service nagios3 start

  2 Responses to “External Commands in Nagios”

  1. Hello,just to make a small correction on your spicrt, the test to know if the value is greater than the warning one will never return a good value leading to a warning as $STATE_WARN doesn’t exist in /usr/lib/nagios/plugins/utils.sh, it should be $STATE_WARNING.Otherwise the spicrt is perfectly working Thanks a lot

  2. Worked for me with Nagios 3 on Raspberry Pi. Thanks!

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)