Page 1 of 1

How to temporarily disable Event Handlers during maintenance

Posted: Fri May 01, 2015 9:34 am
by skynardo
Running Nagios XI 2014R2.5 - I was doing some testing with scheduled downtime and it seems that all this does is stop notifications. I am currently using Event Handlers to forward specific alerts (production/critical) to a 3rd party Event console that is monitored by our Data Center. We have a large ERRATA update happening this weekend that I would like to not generate a bunch of alerts and tickets on our integrated systems. The service checks running on the clients are all passive using nrds and I don't see an option to disable/ignore passive checks. Does anyone have any suggestions about how I could do this. I suppose I could update my templates to remove the EventHandlers during the update, though this is un-handy and would rather be able to schedule something by host group.

Re: How to temporarily disable Event Handlers during mainten

Posted: Fri May 01, 2015 9:40 am
by jdalrymple
The community solution to this is to use the $SERVICEDOWNTIME$ and/or $HOSTDOWNTIME$ macros to your event handler and use logic to prevent them from running. There is no solution intrinsic to Nagios scheduled downtimes.

Re: How to temporarily disable Event Handlers during mainten

Posted: Fri May 01, 2015 9:41 am
by tgriep
A quick way to disable Event Handlers is to click on Admin > Monitoring Engine Status under the System Information menu and disable the Event Handlers.
FYI, this will disable all Event Handlers.

Re: How to temporarily disable Event Handlers during mainten

Posted: Fri May 01, 2015 9:42 am
by Box293
You could globally disable all Active Host and Service checks via Admin > System Information > Monitoring Engine Status > Monitoring Engine Process.

Otherwise you may need to do that on a per host and service level individually.

Another option is to create Escalations that prevent the execution of checks in the event of the master service going down.

Re: How to temporarily disable Event Handlers during mainten

Posted: Fri May 01, 2015 10:05 am
by skynardo
jdalrymple wrote:The community solution to this is to use the $SERVICEDOWNTIME$ and/or $HOSTDOWNTIME$ macros to your event handler and use logic to prevent them from running. There is no solution intrinsic to Nagios scheduled downtimes.
This sounds like a good solution. If I modify my Event Handlers to evaluate SERVICEDOWNTIMES and HOSTDOWNTIMES, I can have them simply exit if not zero? And these Macros would be set via "schedule downtime for all hosts/services in this hostgroup" command ?

Thanks to all that responded. If I don't find time to test this out will use one of the alternative suggestions.

Re: How to temporarily disable Event Handlers during mainten

Posted: Fri May 01, 2015 12:36 pm
by jdalrymple
skynardo wrote:This sounds like a good solution. If I modify my Event Handlers to evaluate SERVICEDOWNTIMES and HOSTDOWNTIMES, I can have them simply exit if not zero? And these Macros would be set via "schedule downtime for all hosts/services in this hostgroup" command ?.
You got it. Let us know if that doesn't work for you.

Re: How to temporarily disable Event Handlers during mainten

Posted: Fri May 01, 2015 2:11 pm
by skynardo
This seems to be working fine. I updated my event handlers and tested. Thanks for the help!