Page 1 of 1

Easier way to disable all services and host

Posted: Thu Jul 20, 2017 7:34 am
by jkinning
I have been looking around and I am sure I am simply overlooking the setting. Sometimes a user will need to perform quick maintenance on a system that is being monitored by Nagios. They click the host and then the Advanced tab to disable notifications. The service checks still send out the notifications. What is the best way to disable the host and service notifications?

I usually goto the More Options and click the View in Nagios Core so I can disable the notifications and then check the check box to disable for host too. Is it possible to add this to the XI GUI interface under Advanced tab? Does the Schedule downtime for all services on this host include the host too? I cannot give you one time when someone needed to just disable the host and not the services and vice-versa. There is always the need to disable notifications for both the host and services and I was trying to find the best and easiest method for them to accomplish this task.

Re: Easier way to disable all services and host

Posted: Thu Jul 20, 2017 10:32 am
by mcapra
Perhaps I'm missing something but does putting the Host in scheduled downtime via the GUI not work for this use case?

https://support.nagios.com/kb/article.php?id=544

Re: Easier way to disable all services and host

Posted: Thu Jul 20, 2017 10:55 am
by dwhitfield
jkinning wrote: Does the Schedule downtime for all services on this host include the host too?
I'm not 100% sure what you mean, because the drop down says "Schedule downtime for all associated services" but that drop down is in addition to the fact that you selected host on the first drop down.

It's certainly possible that you could be doing some sort of DNS check, storage check, or something associated with a host that would stay up when a host goes down, but I do agree in most cases that is what people would want. Do you have a specific suggestion for improvement? You can schedule for services separately, so I don't know that making hosts & services together the default is the right way to go, but I can certainly request that and see what the devs think.

Re: Easier way to disable all services and host

Posted: Thu Jul 20, 2017 11:42 am
by jkinning
This is for a "typical" user not an admin or someone who is familiar with Nagios.

When they click the host and under Advanced they are presented with this screen (See attachment). I don't see any where that will put the both the host and services in maintenance or even allow the disabling of notifications for both.

Re: Easier way to disable all services and host

Posted: Thu Jul 20, 2017 3:49 pm
by ssax
Go to Admin > Manage Components > Actions > Settings:
- Make sure there is a check in the Enable custom actions in Nagios XI checkbox
- Add these

1st:

Enabled: Checked
Object Type: Any
Host: /.*/
Service: /.*/
Action Type: URL
URL / Command: /nagiosxi/includes/components/nagioscore/ui/cmd.php?cmd_typ=29&host=%host%
Action Text: Disable notifications for all services on this host


2nd:

Enabled: Checked
Object Type: Any
Host: /.*/
Service: /.*/
Action Type: URL
URL / Command: /nagiosxi/includes/components/nagioscore/ui/cmd.php?cmd_typ=28&host=%host%
Action Text: Enable notifications for all services on this host

That will add those links to the main host and service page so they are easier to access, will that work for you?


Thank you

Re: Easier way to disable all services and host

Posted: Fri Jul 21, 2017 8:19 am
by jkinning
Thanks! That should work.

Re: Easier way to disable all services and host

Posted: Fri Jul 21, 2017 10:31 am
by bolson
May we go ahead and close this topic?

Re: Easier way to disable all services and host

Posted: Fri Jul 21, 2017 12:43 pm
by jkinning
Sure you can close.