Page 1 of 1
Notification Variable Questions
Posted: Mon Feb 18, 2019 12:56 pm
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?!?!
Re: Notification Variable Questions
Posted: Mon Feb 18, 2019 2:40 pm
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
Re: Notification Variable Questions
Posted: Mon Feb 18, 2019 2:43 pm
by BanditBBS
Thanks Ludmil! Dont forget the important part of the "LASTSERVICEPROBLEMID" not showing the correct number as well!
Re: Notification Variable Questions
Posted: Mon Feb 18, 2019 3:01 pm
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$.
Re: Notification Variable Questions
Posted: Mon Feb 18, 2019 3:04 pm
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!
Re: Notification Variable Questions
Posted: Mon Feb 18, 2019 3:13 pm
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.