Page 1 of 2

Unable to add a host or service in downtime mode

Posted: Fri Jul 27, 2012 10:15 am
by dworthcsl
Hi,

I am trying to put a host an all of its services in maintenance mode. However, when I add all of my information and click commit I get the following:
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.
Logged into XI, I am able click on a service or host and disable notifications, reschedule a check, etc. I am also able to put a host or service in re-occuring downtime. My account is associated with the server. Is there anything else I am missing?

Thanks,
David

Re: Unable to add a host or service in downtime mode

Posted: Fri Jul 27, 2012 10:17 am
by dworthcsl
This is ver 2011R3.2 on RHEL 6.x 64bit.

Re: Unable to add a host or service in downtime mode

Posted: Fri Jul 27, 2012 12:37 pm
by mguthrie
What user are you logged into Nagios XI as?

When you go to fill in the information, what username does the Core cgi say your logged in as (top left on page)?

Re: Unable to add a host or service in downtime mode

Posted: Mon Jul 30, 2012 10:00 am
by dworthcsl
I am logged into XI as my user ID. When I go to add a service for maintenance, it list my full name, which is the same as the name that is listed under my userid. I just logged out and logged back in. I was able to put a host into maintenance mode, but not a service. When adding a service, I tried to put a * for service name to disable all services. I am not sure if this is a valid option. However, I also tried with a service name and that did not work.

Here is an example of what I am filling in.

Code: Select all

Host Name:	server_name
Service:	Check Disk nrpe
Author (Your Name):	This was filled in the name associated with my userid
Comment:	test

Triggered By:	default

Start Time:	default
End Time:	default
Type:	Tried flex and fixed
If Flexible, Duratio 2 hours



Re: Unable to add a host or service in downtime mode

Posted: Mon Jul 30, 2012 10:06 am
by mguthrie
Can you check the following file and verify that your user ID was added to the following file for host and service commands?

/usr/local/nagios/etc/cgi.cfg

Re: Unable to add a host or service in downtime mode

Posted: Mon Jul 30, 2012 11:25 am
by dworthcsl
My id is valid for the following:

authorized_for_all_host_commands
authorized_for_all_hosts
authorized_for_all_service_commands
authorized_for_all_services
authorized_for_configuration_information
authorized_for_system_commands
authorized_for_system_information

Re: Unable to add a host or service in downtime mode

Posted: Mon Jul 30, 2012 11:39 am
by scottwilkerson
You need to make sure that the service name is exactly correct or you will get this error.

For example, if the service name is
/ Disk Usage
and you enter

Code: Select all

Check Disk nrpe
You will get this error.

To see if this is the problem, go to the service detail page
Advanced tab
click Schedule downtime
Then just add comment and modify time.

If it goes through, you just had a bad service name

Re: Unable to add a host or service in downtime mode

Posted: Mon Jul 30, 2012 2:29 pm
by dworthcsl
That did work. Is there a way to add all services to a maintenance window? i.e. using "*" in the service field

Re: Unable to add a host or service in downtime mode

Posted: Mon Jul 30, 2012 2:48 pm
by scottwilkerson
Go to Host Detail Page -> Advanced Tab -> See this host in Nagios Core

Then select "Schedule downtime for all services on this host"

Re: Unable to add a host or service in downtime mode

Posted: Thu Aug 02, 2012 9:34 am
by dworthcsl
Thanks! I was able to find it. It would be great to have the ability to disable all services off the Incident Management > Scheduled Downtime. That will save a step, but the current way works.