Unique Identifier for Alert Messages

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
brudnick
Posts: 37
Joined: Mon Feb 17, 2014 3:17 pm

Unique Identifier for Alert Messages

Post by brudnick »

We are sending alert notifications to our Ticketing system via email so that it opens a ticket. I was wondering if there was a unique Identifier that could be use so that multiple tickets aren't created on the same incident. Is there something in the Macros that could be used for this. A number that does not change until the issue is brought back to a OK state.
cmerchant
Posts: 546
Joined: Wed Sep 24, 2014 11:19 am

Re: Unique Identifier for Alert Messages

Post by cmerchant »

I think it would be the $serviceproblemid$ macro described in this doc:
http://nagios.sourceforge.net/docs/nagi ... eproblemid
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

Re: Unique Identifier for Alert Messages

Post by jolson »

I believe that $SERVICEPROBLEMID$ is what you are looking for.
A globally unique number associated with the service's current problem state. Every time a service (or host) transitions from an OK or UP state to a problem state, a global problem ID number is incremented by one (1). This macro will be non-zero if the service is currently a non-OK state. State transitions between non-OK states (e.g. WARNING to CRITICAL) do not cause this problem id to increase. If the service is currently in an OK state, this macro will be set to zero (0). Combined with event handlers, this macro could be used to automatically open trouble tickets when services first enter a problem state.
http://nagios.sourceforge.net/docs/3_0/macrolist.html

Best,


Jesse
Twits Blog
Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
brudnick
Posts: 37
Joined: Mon Feb 17, 2014 3:17 pm

Re: Unique Identifier for Alert Messages

Post by brudnick »

Thanks guys, I will test with these macros and report back if this is what I want.
cmerchant
Posts: 546
Joined: Wed Sep 24, 2014 11:19 am

Re: Unique Identifier for Alert Messages

Post by cmerchant »

Great, let us know if that will work for you when you get a chance to try it out. Thanks.
brudnick
Posts: 37
Joined: Mon Feb 17, 2014 3:17 pm

Re: Unique Identifier for Alert Messages

Post by brudnick »

So, the recovery message comes back with the ID of 0 for each one. What's up with that?
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Unique Identifier for Alert Messages

Post by abrist »

jolson wrote: If the service is currently in an OK state, this macro will be set to zero (0).
It might consider the recovery to be an "OK" state . . . .
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Locked