Hello,
So I made a Reactor event chain that is able to manipulate Windows services. it is able to start, stop, restart one or more service on a host or all members of a hostgroup. I added some code which helps to determine if this event chain is launched with a Nagios event handler. So it accepts the curentservice state and the statetype and will compare this with the requested state type and service state to see if the service is to be started / stopped / restarted.
This works fine, but i'm having the folllowing thought:
As this event chain is triggered every time the state of the service is hard critical, this means we are no longer able to stop the service for longer then 5 minutes. Is there a way to make Nagios XI not execute event handlers when the service / host is in downtime?
I could script this manually and check in the code if the service is in downtime, but it seems logical this should be a global option to not execute event handlers while in downtime?
Grtz
Willem
Disable Reactor event handler during downtime
Disable Reactor event handler during downtime
You do not have the required permissions to view the files attached to this post.
Nagios XI 5.8.1
https://outsideit.net
https://outsideit.net
Re: Disable Reactor event handler during downtime
That's the solution for right now.WillemDH wrote:I could script this manually and check in the code if the service is in downtime
I can see the argument for that, but event handlers are meant to handle events, and we let the script decide how. Just like how plugins handle their own checking logic, notifications handle their own logic, etc. Now granted, plugins and notifications have logic in Core itself to determine when they are run, but they are also assumed to be used in all installs, whereas event handlers are somewhat optional. This keeps configuration clutter down.WillemDH wrote:but it seems logical this should be a global option to not execute event handlers while in downtime?
Definitely could make a feature request for this on GitHub, likely wouldn't be too hard (I've added similar things myself in the past). I just can't make any guaranteees.
Former Nagios employee
Re: Disable Reactor event handler during downtime
Trevor,
Ok, thanks. Good to know it isn't possible yet.
I made https://github.com/NagiosEnterprises/na ... issues/108
This thread can be closed.
Grtz
Willem
Ok, thanks. Good to know it isn't possible yet.
I made https://github.com/NagiosEnterprises/na ... issues/108
This thread can be closed.
Grtz
Willem
Nagios XI 5.8.1
https://outsideit.net
https://outsideit.net
Re: Disable Reactor event handler during downtime
Thanks, Willem! I am closing the thread.
Be sure to check out our Knowledgebase for helpful articles and solutions!