Notification clarification needed

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Notification clarification needed

Post by ssax »

RR acknowledgements are not sticky, you can see the type of acknowledgements by looking at the host/service that you acknowledged in /usr/local/nagios/var/status.dat.

I validated it with RR/Normal/Sticky.

No acknowledgement:

Code: Select all

acknowledgement_type=0
Normal acknowledgement:

Code: Select all

acknowledgement_type=1
Sticky acknowledgement:

Code: Select all

acknowledgement_type=2
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Notification clarification needed

Post by ssax »

Did you make the change to rr.php and set it to 2 and it's not working?

Edit: I tested it on mine and the sticky works after changing it to 2.

Change (lines 140-144)

Code: Select all

/usr/local/nagiosxi/html/rr.php
From:

Code: Select all

            if ($service != "") {
                $cmdstr = sprintf("%s;%s;%s;1;1;1;%s;%s", "ACKNOWLEDGE_SVC_PROBLEM", $host, $service, $author, $comment);
            } else {
                $cmdstr = sprintf("%s;%s;1;1;1;%s;%s", "ACKNOWLEDGE_HOST_PROBLEM", $host, $author, $comment);
            }
To:

Code: Select all

            if ($service != "") {
                $cmdstr = sprintf("%s;%s;%s;2;1;1;%s;%s", "ACKNOWLEDGE_SVC_PROBLEM", $host, $service, $author, $comment);
            } else {
                $cmdstr = sprintf("%s;%s;2;1;1;%s;%s", "ACKNOWLEDGE_HOST_PROBLEM", $host, $author, $comment);
            }
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: Notification clarification needed

Post by BanditBBS »

ssax, thanks for all the work...really helping me figure some stuff out here! check out this image:
Capture.PNG
That is showing all the comments/acknowledgements this service has received. Notice the different users...well, thats the same user. sdnagios is the XI username and the longer one is the Name field of the XI user sdnagios. So, whn acknowledging using rr does it use the XI username for the comment and when acknowledging via service status page does that use the Name column? That would explain quite a bit and make me definitely need to use Trevor's patch.
You do not have the required permissions to view the files attached to this post.
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
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Notification clarification needed

Post by tmcdonald »

sdnagios is more than likely the name of the contact that is associated with the user. When you acknowledge from the Core interface as my patch modifies, it has no knowledge of any XI users so it uses the contact name. rr.php does know about XI users so it uses that.
BanditBBS wrote:[...] and make me definitely need to use Trevor's patch.
The horror :o
Former Nagios employee
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: Notification clarification needed

Post by BanditBBS »

tmcdonald wrote:sdnagios is more than likely the name of the contact that is associated with the user. When you acknowledge from the Core interface as my patch modifies, it has no knowledge of any XI users so it uses the contact name. rr.php does know about XI users so it uses that.
BanditBBS wrote:[...] and make me definitely need to use Trevor's patch.
The horror :o
I'll be testing that, in detail this evening and will be replying again later. Going home now.
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
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Notification clarification needed

Post by abrist »

Drum roll please. . .
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.
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: Notification clarification needed

Post by BanditBBS »

Never been happier to say Trevor was wrong, LOL.

The user setup in XI is: Username:jclark Name:Jim Clark

When using rr the comment is attributed to jclark.

When going to Service Detail and then advanced tab and sending a custom notification or acknowledging a problem XI auto fills and doesn't let you edit the Your Name field with the Name from the XI user, so in this case, Jim Clark.

That test means that is the reason no alert since the 2/26/15 acknowledgment from "ITC Service Desk(nagios)" as they used the XI interface and not rr. That means sticky was checked and on by default. So it looks like the service desk uses both the XI interface and rr. I can leave rr alone since it is already set to 1;1;1 and I'm going to implement Trevor's patch(leaving send ack checked though) so either method they use the ack is not sticky unless they actually purposely check the box!

Thanks for testing, defining and coding for me in this thread :)
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
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: Notification clarification needed

Post by BanditBBS »

Umm, can someone tell me wtf I need to do with Trevor's .diff files :)

I can remember once before Andy had me recompile core and do the upgrade for something else, but who knows where that post is...I'm searching
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
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Notification clarification needed

Post by Box293 »

Download the nagiosxi zip and extract it.
Iin the extracted directory, put the file in subcomponents/nagioscore/patches/
I think it needs to end with .patch
Run ./upgrade and the patch will be applied
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: Notification clarification needed

Post by BanditBBS »

Box293 wrote:Download the nagiosxi zip and extract it.
Iin the extracted directory, put the file in subcomponents/nagioscore/patches/
I think it needs to end with .patch
Run ./upgrade and the patch will be applied
That didn't work :(

Anyone else want to tell me the steps that was missing?
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
Locked