I need downtime to include turning off the event handler
I need downtime to include turning off the event handler
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!
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
You can pass the following macro to your event handler command and if its value is not 0 exit
https://assets.nagios.com/downloads/nag ... cedowntime
Code: Select all
$SERVICEDOWNTIME$Re: I need downtime to include turning off the event handler
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
sounds goodbpennin 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.
Re: I need downtime to include turning off the event handler
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?
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
How did you setup the event handlers with the macro I provided?
Re: I need downtime to include turning off the event handler
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.
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
Oh, I didn't see that it was a global event handler..
Yes these only fire when the state changes.
Yes these only fire when the state changes.
Re: I need downtime to include turning off the event handler
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?
- 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
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.