Page 1 of 1
Only triggering an event in Hard state
Posted: Fri Dec 09, 2016 1:54 am
by yunushaikh
Hello,
Is there any way in nagios to trigger the alert only in hard state when the notification is send and not in soft state?
Thanks.
Re: Only triggering an event in Hard state
Posted: Fri Dec 09, 2016 8:52 am
by eloyd
You need to pass the proper macros into your event handler and then check to see if it's a HARD state or SOFT state in the event handler. Then decide whether or not to take action.
Nagios ALWAYS triggers event handlers if they are defined and the thing is not in an OK state. It's up to the event handler script to determine if it should do something or not.
Read this for more information:
https://assets.nagios.com/downloads/nag ... dlers.html
Re: Only triggering an event in Hard state
Posted: Fri Dec 09, 2016 11:22 am
by mcapra
Thanks
@eloyd!
@yunushaikh let us know if you have additional questions regarding this.
Re: Only triggering an event in Hard state
Posted: Fri Dec 09, 2016 3:57 pm
by yunushaikh
Done thanks a lot..
you can close this thread
Re: Only triggering an event in Hard state
Posted: Fri Dec 09, 2016 4:09 pm
by eloyd
Sweet. Glad to be of assistance.