Page 1 of 1

Notification number and last state macros

Posted: Thu Nov 01, 2018 10:24 am
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

Re: Notification number and last state macros

Posted: Thu Nov 01, 2018 10:29 am
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.

Re: Notification number and last state macros

Posted: Thu Nov 01, 2018 11:19 am
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

Re: Notification number and last state macros

Posted: Thu Nov 01, 2018 1:06 pm
by Bitflogger
Hello,

I have the alerts going to a

Re: Notification number and last state macros

Posted: Thu Nov 01, 2018 1:10 pm
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

Re: Notification number and last state macros

Posted: Thu Nov 01, 2018 3:29 pm
by Bitflogger
Not a big deal, I can work around it.

Please consider checking this for a future release.

Earl

Re: Notification number and last state macros

Posted: Thu Nov 01, 2018 4:28 pm
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