How to temporarily disable Event Handlers during maintenance
How to temporarily disable Event Handlers during maintenance
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
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
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.
FYI, this will disable all Event Handlers.
Be sure to check out our Knowledgebase for helpful articles and solutions!
- 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
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.
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.
Re: How to temporarily disable Event Handlers during mainten
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 ?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.
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
You got it. Let us know if that doesn't work for you.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 ?.
Re: How to temporarily disable Event Handlers during mainten
This seems to be working fine. I updated my event handlers and tested. Thanks for the help!