How to temporarily disable Event Handlers during maintenance

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
skynardo
Posts: 136
Joined: Tue Sep 18, 2012 8:59 am
Location: St. Louis, MO

How to temporarily disable Event Handlers during maintenance

Post 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.
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: How to temporarily disable Event Handlers during mainten

Post 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.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: How to temporarily disable Event Handlers during mainten

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: How to temporarily disable Event Handlers during mainten

Post 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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
skynardo
Posts: 136
Joined: Tue Sep 18, 2012 8:59 am
Location: St. Louis, MO

Re: How to temporarily disable Event Handlers during mainten

Post 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.
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: How to temporarily disable Event Handlers during mainten

Post 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.
skynardo
Posts: 136
Joined: Tue Sep 18, 2012 8:59 am
Location: St. Louis, MO

Re: How to temporarily disable Event Handlers during mainten

Post by skynardo »

This seems to be working fine. I updated my event handlers and tested. Thanks for the help!
Locked