Hi Team,
i have configured a linux based sms gateway to send sms alerts if a host is down.
i have created a new misc command and put it as an event handler.
so if a host is down, it will execute that event handler and sms is coming.
I have given recheck interval as 10 minutes. so it checks all hosts for every 10 minutes and if a host is down, it will send sms every 10 minutes.
Now the issue is if a host is down for say around 2 hrs, it is triggering sms for around 2 checks. after that it is not executing the event handler.
But i want to be in such a way it has to trigger the event handler every 10 minutes, until the host is up.
Please advise.
Event hanler not executing continously
Re: Event hanler not executing continously
Event handlers, by default, only run when a HARD state change occurs. By enabling "is_volatile", nagios will treat every check as a state change which will in turn run the event handler every check. This is the suggested way, but you need to stop the event handler from running when the state is OK/UP. You will need to pass the object state macro to your event handler script so that the script can check to see if it is a problem state before continuing, if it is not a problem state, it should exit.
Does this make sense?
Does this make sense?
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.
"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.