Notification number and last state macros

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
Bitflogger
Posts: 226
Joined: Mon Oct 16, 2017 9:24 am

Notification number and last state macros

Post by Bitflogger »

Hello, I'm running v5.5.3 64-bit VM CentOS7.

I'm trying to pass along the first critical alert to an application, but not any subsequent alerts, while other alerts got to support staff as usual.

This turns out to be much harder than I expected.

I have seen first critical alerts where the $SERVICENOTIFICATIONNUMBER$ is 1 or 2.

I have seen first critical alerts where the $LASTSERVICESTATE$ is critical, possibly due to retesting the probe twice before a hard critical is declared.

There may be the same problem with $HOSTNOTIFICATIONNUMBER$ and $LASTHOSTSTATE$.

Earl
Bitflogger
Posts: 226
Joined: Mon Oct 16, 2017 9:24 am

Re: Notification number and last state macros

Post by Bitflogger »

I should add, that the alerts go through a program.

The program tries to determine from the notification number and last state if it should pass the alert along.
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: Notification number and last state macros

Post by npolovenko »

Hello, @Bitflogger. I'd probably try to use a custom event handler that only sends a notification to the ticketing system on a first state change and doesn't do anything on all subsequent changes. We don't have that script so you'd need to write your own. But you can find examples of the event handler script syntax in this tutorial.
https://assets.nagios.com/downloads/nag ... ios-XI.pdf
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Bitflogger
Posts: 226
Joined: Mon Oct 16, 2017 9:24 am

Re: Notification number and last state macros

Post by Bitflogger »

Hello,

I have the alerts going to a
Bitflogger
Posts: 226
Joined: Mon Oct 16, 2017 9:24 am

Re: Notification number and last state macros

Post by Bitflogger »

Hello,

I want to send alerts more than once to support staff, using the standard notification interval.

I have what I need, conceptually, to filter out the first alert.

Operationally, I need the $SERVICENOTIFICATIONNUMBER$ and/or $LASTSERVICESTATE$ to work correctly.

Earl
Bitflogger
Posts: 226
Joined: Mon Oct 16, 2017 9:24 am

Re: Notification number and last state macros

Post by Bitflogger »

Not a big deal, I can work around it.

Please consider checking this for a future release.

Earl
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: Notification number and last state macros

Post by npolovenko »

@Bitflogger, We had a few bug fixes in the recent releases of XI, including the one related to performance counters issues. Please go ahead and upgrade to XI 5.5.6 and let me know if you're still experiencing the issue.
https://assets.nagios.com/downloads/nag ... ctions.pdf
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked