Scheduled Downtime Problem


#1

Hello,
I’ve got a Nagios server up and completely operation except for the Schedule downtime and external commands. When I try to schedule downtime on the web GUI on some hosts I receive the following error.

[blockquote]Error: Could not stat() command file ‘/usr/local/nagios/var/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.
[/blockquote]
and on some of the other hosts I receive this error:

[blockquote]Sorry, but you are not authorized to commit the specified command.

Read the section of the documentation that deals with authentication and authorization in the CGIs for more information.[/blockquote]

I have designated a specific user for all administrative purposes and I replaced this user every place nagiosadmin was previously at in cgi.cfg, and I’ve followed all the FAQs about the correct permissions on /usr/local/nagios/var/rw/ as far as the commands go but I can’t seem to get it to work. Any help would be greatly appreciated.


#2

Hi !
when you receive this error:
Error: Could not stat() command file ‘/usr/local/nagios/var/rw/nagios.cmd’!

try a restart of nagios (not a reload): it re-creates the nagios.cmd file with the right rights :slight_smile:
(and it will be alright from then).

I hope it will solve your 1st problem.

For the “Sorry, but you are not authorized to commit the specified command”, check that these 2 variables in your cgi.cfg are properly set:
authorized_for_all_service_commands=your_user
authorized_for_all_host_commands=your_user
Otherwise, try replacing “your_user” with a * and try again