Notification Variable Questions

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Notification Variable Questions

Post by BanditBBS »

So, we are deploying ServiceNow and decided to implement automatic ticket opening and closing. I'm playing around on my dev XI server and have a few issues.

For Service Notifications I am now passing the extra variable of "--lastserviceproblemid=$LASTSERVICEPROBLEMID$"
In my notifications I am testing I have added %SERVICEPROBLEMID% and %LASTSERVICEPROBLEMID%
When I create an issue and get a notification the problem ID is 495 and last problem id is 494. Seems fine.
When I make it go back ok the notification has the exact same numbers! I thought problem ID should be 0 and Last Problem ID should be 495?!?!
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Notification Variable Questions

Post by lmiltchev »

When I make it go back ok the notification has the exact same numbers! I thought problem ID should be 0 and Last Problem ID should be 495?!?!
I was able to recreate the issue. I believe this is a bug as according to the Nagios Core documentation, the $SERVICEPROBLEMID$ should be set to zero when the service is in OK state.

https://assets.nagios.com/downloads/nag ... eproblemid
example01.PNG
I will be filing an internal bug report on the issue. Thank you for reporting this!

Update: Actually, because this is a Nagios Core issue, I posted it on GitHub:

https://github.com/NagiosEnterprises/na ... issues/621
You do not have the required permissions to view the files attached to this post.
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: Notification Variable Questions

Post by BanditBBS »

Thanks Ludmil! Dont forget the important part of the "LASTSERVICEPROBLEMID" not showing the correct number as well!
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Notification Variable Questions

Post by lmiltchev »

This part worked for me though... We will do some more digging into this just to be sure that the $LASTSERVICEPROBLEMID$ shows the "previous" $SERVICEPROBLEMID$.
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: Notification Variable Questions

Post by BanditBBS »

lmiltchev wrote:This part worked for me though... We will do some more digging into this just to be sure that the $LASTSERVICEPROBLEMID$ shows the "previous" $SERVICEPROBLEMID$.
Specifically on the OK(RECOVERY) notification.

Thanks again and close this up!
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Notification Variable Questions

Post by lmiltchev »

I need to correct myself - $SERVICEPROBLEMID$ moved to $LASTSERVICEPROBLEMID$ only when the state changed to CRITICAL, but remained the same when the service recovered. Our developers are aware of the issue and will be working on a fix.
Thanks again and close this up!
You are welcome! I am locking the topic.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked