I need downtime to include turning off the event handler

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
bpennin
Posts: 85
Joined: Tue Feb 20, 2018 2:23 pm

I need downtime to include turning off the event handler

Post by bpennin »

All,

We need to have a way to put a service in downtime and prevent the event handler from running for that service during that downtime period. Scheduled downtime just prevents notifications but allows the event handler to run, which in our case, sends a notification of the service being down to TrueSight(BMC event handler and notification software). Is there a way to stop a service from running or disabling the event handler outside of scheduled downtime?

Thanks for your help!
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: I need downtime to include turning off the event handler

Post by scottwilkerson »

You can pass the following macro to your event handler command and if its value is not 0 exit

Code: Select all

$SERVICEDOWNTIME$
https://assets.nagios.com/downloads/nag ... cedowntime
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
bpennin
Posts: 85
Joined: Tue Feb 20, 2018 2:23 pm

Re: I need downtime to include turning off the event handler

Post by bpennin »

Scott - Thanks for the quick response and we will run this through our test environment and let you know if we have questions. I am assuming we will not but I will reply back so you can lock this up.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: I need downtime to include turning off the event handler

Post by scottwilkerson »

bpennin wrote:Scott - Thanks for the quick response and we will run this through our test environment and let you know if we have questions. I am assuming we will not but I will reply back so you can lock this up.
sounds good
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
bpennin
Posts: 85
Joined: Tue Feb 20, 2018 2:23 pm

Re: I need downtime to include turning off the event handler

Post by bpennin »

I found that I can turn off the global event handler during downtime. Cool - but not that cool...
When down time is ended and I have a host down still the event handler does not pick it up? What can we do to alert on hosts that are still down after a black out period?
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: I need downtime to include turning off the event handler

Post by scottwilkerson »

How did you setup the event handlers with the macro I provided?
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
bpennin
Posts: 85
Joined: Tue Feb 20, 2018 2:23 pm

Re: I need downtime to include turning off the event handler

Post by bpennin »

Scott,

I pass the hostindowntime to our eventhandler but we are not using it because the global event handler has don't run in downtime checked. Unless I am missing something, I can not find a way to make the event handler run again after downtime ends to see a host that is still down? I did find the is volatile setting but that is only for a service and would be very chatty to deal with.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: I need downtime to include turning off the event handler

Post by scottwilkerson »

Oh, I didn't see that it was a global event handler..

Yes these only fire when the state changes.
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
bpennin
Posts: 85
Joined: Tue Feb 20, 2018 2:23 pm

Re: I need downtime to include turning off the event handler

Post by bpennin »

Forum folks/Scott

- Does anyone have a event handler that will see a host/service down during downtime that will run again when downtime is over to see if the host/service is still in a down state?
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: I need downtime to include turning off the event handler

Post by scottwilkerson »

I'll leave this open in case someone else has a solution, but, Nagios only fires event handlers when state changes, so an event handler will not fire if the state doesn't change after it comes out of downtime.
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked