Service handler triggered by SOFT alerts

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
mbeebe
Posts: 144
Joined: Thu Dec 20, 2018 5:12 pm

Service handler triggered by SOFT alerts

Post by mbeebe »

Hello,

We're using a service handler to send alerts to a third-party product when a critical alert fires. Our general service monitoring setup is to check every 15 minutes, then if there's a problem, check once every minute for five minutes before firing an alert.

We ran into an issue today: the service handler in question was firing every minute on SOFT alerts instead of only once for the HARD alert. This resulted in a ton of spam being sent to the team and on-call person.

Is there any way to have the service handler only fire on the final HARD alert?

As a nb: the service check in question is binary: it's either CRITICAL or it's not; there's no WARN state. I don't know if this makes a difference, but I thought I'd throw it out there anyway.

Thanks,

-- Mike Beebe
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Service handler triggered by SOFT alerts

Post by ssax »

What version of XI are you running? You can grab it from the bottom left hand side of the web interface.

You will need to update your event handler to not fire if it's a SOFT state, you would need to use the available macro such as $SERVICESTATETYPE$ which indicates HARD or SOFT to determine that, see here for all available macros and when they are available:

https://assets.nagios.com/downloads/nag ... estatetype
mbeebe
Posts: 144
Joined: Thu Dec 20, 2018 5:12 pm

Re: Service handler triggered by SOFT alerts

Post by mbeebe »

Hello,

We're running 5.6.7.

I'll look into that macro.

Thanks,

-- Mike Beebe
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Service handler triggered by SOFT alerts

Post by ssax »

Should be good with that version.

How are you running the event handler? From the service or from Admin > Manage Components > Global Event Handlers?
mbeebe
Posts: 144
Joined: Thu Dec 20, 2018 5:12 pm

Re: Service handler triggered by SOFT alerts

Post by mbeebe »

The event handler is set in the service management for the services in question.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Service handler triggered by SOFT alerts

Post by ssax »

Ok, yeah, the problem is in your script then, please update it to look at the macro I previously referenced.
mbeebe
Posts: 144
Joined: Thu Dec 20, 2018 5:12 pm

Re: Service handler triggered by SOFT alerts

Post by mbeebe »

Hi Ssax,

That worked great -- a little simple logic in the script and we're now not seeing the additional alert emails.

Thanks!

-- Mike Beebe
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: Service handler triggered by SOFT alerts

Post by benjaminsmith »

Hi Mike,

Glad to hear that worked. Did you have any other questions or may we close this thread?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
mbeebe
Posts: 144
Joined: Thu Dec 20, 2018 5:12 pm

Re: Service handler triggered by SOFT alerts

Post by mbeebe »

Nope -- please close the thread, thanks.
Locked