Page 1 of 1
Notification intervals for event handlers
Posted: Sun Mar 08, 2015 1:11 pm
by venkitesh
Hi Team,
I have configured one event handler for sending an sms alert if a host is down.
i need in such a way that if a host is down. wait for 2 mins before executing this event handler.
i have given first notification delay as 2 mins. but that is working for only emails i guess.
Any interval settings for event handlers.
Kindly help.
Re: Notification intervals for event handlers
Posted: Mon Mar 09, 2015 12:13 pm
by abrist
venkitesh wrote:Any interval settings for event handlers.
No, there are not. Event handlers are run
immediately when an object changes state. You either need to put a sleep in the script, or add another retry or two to the check.
Re: Notification intervals for event handlers
Posted: Wed Mar 11, 2015 1:42 am
by venkitesh
HI Abrist,
any method to achieve this.
this is really troubling us.
Re: Notification intervals for event handlers
Posted: Wed Mar 11, 2015 10:48 am
by tmcdonald
You would need to build the delay into whatever script the event handler runs, as abrist mentioned.
Re: Notification intervals for event handlers
Posted: Thu Mar 12, 2015 1:53 am
by venkitesh
hi
let me explain.
Sometimes a host will be flappping. so it will be in down state hardly for a minute.
so what we want to do is, wait for 2 minutes before executing event handler, because if it pings in between no need to execute the event handler.
if a put a sleep in the script, say 2 mins, it will execute the script after 2 minutes which is not required if the host pings in between.
i hope you understood my requirement.
Please help
Re: Notification intervals for event handlers
Posted: Thu Mar 12, 2015 9:39 am
by tmcdonald
There are no interval settings for event handlers. If you need a delay for one it will need to be written into the script. You can have the script run its own ping check against the host and make decisions from there. Otherwise, make a new contact for the SMS notifications and assign it, then put a delay on that. This will, however, affect the delays for the whole service and all contacts on it, not just that SMS-only contact.