Only triggering an event in Hard state

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
yunushaikh
Posts: 176
Joined: Sat Jun 20, 2015 9:04 pm

Only triggering an event in Hard state

Post 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.
User avatar
eloyd
Cool Title Here
Posts: 2190
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: Only triggering an event in Hard state

Post 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
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Only triggering an event in Hard state

Post by mcapra »

Thanks @eloyd!

@yunushaikh let us know if you have additional questions regarding this.
Former Nagios employee
https://www.mcapra.com/
yunushaikh
Posts: 176
Joined: Sat Jun 20, 2015 9:04 pm

Re: Only triggering an event in Hard state

Post by yunushaikh »

Done thanks a lot..

you can close this thread
User avatar
eloyd
Cool Title Here
Posts: 2190
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: Only triggering an event in Hard state

Post by eloyd »

Sweet. Glad to be of assistance.
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
Locked