Notification intervals for event handlers

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
venkitesh
Posts: 67
Joined: Tue Jan 27, 2015 12:34 am

Notification intervals for event handlers

Post 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.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Notification intervals for event handlers

Post 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.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
venkitesh
Posts: 67
Joined: Tue Jan 27, 2015 12:34 am

Re: Notification intervals for event handlers

Post by venkitesh »

HI Abrist,

any method to achieve this.

this is really troubling us.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Notification intervals for event handlers

Post by tmcdonald »

You would need to build the delay into whatever script the event handler runs, as abrist mentioned.
Former Nagios employee
venkitesh
Posts: 67
Joined: Tue Jan 27, 2015 12:34 am

Re: Notification intervals for event handlers

Post 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
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Notification intervals for event handlers

Post 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.
Former Nagios employee
Locked