Disable check for host through web not working


After installing and configuring hosts manually and starting nagios.

I checked localhost/nagios and it worked after authentication

but when I choose a host and click on disabling check for the host and click on commit on next page
it gives me this error,
Error: Could not open command file ‘/var/nagios/rw/nagios.cmd’ for update!

The permissions on the external command file and/or directory may be incorrect. Read the FAQs on how to setup proper permissions.

An error occurred while attempting to commit your command for processing.

Please let me know what could be the issue


firstly, check that your check_external_commands is set to 1 (it should already be).

Then, delete the file /var/nagios/rw/nagios.cmd if it is already present

and finally, restart your nagios (not just a reload, but a restart).

With the restart, nagios should create a new /var/nagios/rw/nagios.cmd file with the correct rights, so it should work properly (note: check the rights on this file and don’t hesitate to change them if the owner is not your nagios user)


I replaced
#nagios_check_command=/usr/nagios/libexec/check_nagios /var/nagios/status.dat 5 ‘/usr/nagios/bin/nagios’

with this one
nagios_check_command=/usr/nagios/libexec/check_nagios -e 5 -C ‘/usr/nagios/bin/nagios’ -F ‘/var/log/nagios/status.log’

Rest all which you had suggested is already done

Thank you very much for the reply


Above changes solved problem