2009-06-19

Nagios - Error "Error: Could not open command file '/var/spool/nagios/rw/nagios.cmd' for update"

After an upgrade of Nagios, Nagios re-schedule function for next service check is not working. The Nagios web interface complained "Error: Could not open command file '/var/spool/nagios/rw/nagios.cmd' for update". Its problem lies on the webserver was unable to access the file to update the schedule.

Change the ownership of the file to the webserver so that the webserver is able to update the schedule.
e.g.
chown httpd:httpd /var/spool/nagios/rw/nagios.cmd

To determine the owner of the webserver, use the following command to find out :
e.g.
ps aux | grep -i httpd

Hasta la vista !!!

1 comment:

Rob Cranfill said...

That worked for me (with OpenSuSE 11.3, Nagios Core 3.2.1); however on this distro the proper path is /var/spool/nagios/nagios.cmd.