Respond URL - Bad Ticket

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

Re: Respond URL - Bad Ticket

Post by BanditBBS »

Ok, getting the error quite frequently apparently. If you'd like to investigate lets do it :)

This is our service desk that creates a ticket and then acknowledges alerts, so kind of a pain in the butt with rr not working for them.
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
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Respond URL - Bad Ticket

Post by sreinhardt »

Do we know if this is happening with all users attempting to use rapid response links? Also just to get it out of the way, XI version on that system? Let's also run the following:

Code: Select all

grep 'secure_response_url' /usr/local/nagiosxi/html/config.inc.php
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: Respond URL - Bad Ticket

Post by BanditBBS »

sreinhardt wrote:Do we know if this is happening with all users attempting to use rapid response links? Also just to get it out of the way, XI version on that system? Let's also run the following:

Code: Select all

grep 'secure_response_url' /usr/local/nagiosxi/html/config.inc.php
Sorry, this is on teh 2014 1.4 Server. This is not happening for all users as I just checked with some of the notifications I have received(not for same host/services though).

Secure response URL is remarked out, I did not enable that here:

Code: Select all

// $cfg['secure_response_url']=1;
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: Respond URL - Bad Ticket

Post by tmcdonald »

This is gonna be gross, but bear with me:

Code: Select all

echo "select backend_ticket from xi_users where user_id=51" | psql -t nagiosxi nagiosxi | tr -d ' ' | tr -d "\n" | md5sum
Former Nagios employee
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: Respond URL - Bad Ticket

Post by BanditBBS »

tmcdonald wrote:This is gonna be gross, but bear with me:

Code: Select all

echo "select backend_ticket from xi_users where user_id=51" | psql -t nagiosxi nagiosxi | tr -d ' ' | tr -d "\n" | md5sum

Code: Select all

[root@iss-chi-nag05 shapes]# echo "select backend_ticket from xi_users where user_id=51" | psql -t nagiosxi nagiosxi | tr -d ' ' | tr -d "\n" | md5sum
9c12089a0ee5c6da4f7575d700e3c185  -
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: Respond URL - Bad Ticket

Post by tmcdonald »

Edit /usr/local/nagiosxi/html/rr.php around line 68 and add in the following:

Code: Select all

    if ($user_ticket_md5 != $ticket_md5) {
        echo "Bad ticket";
        echo "$user_ticket_md5 should be equal to $ticket_md5"; // Add me
        exit();
    }

then visit the RR link again (with the double hyphen reduced to just one, or course). I wanna see what the PHP thinks those backend MD5s are.
Former Nagios employee
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: Respond URL - Bad Ticket

Post by BanditBBS »

If I leave in the double - then I get the ticket should be "1"

If I knock it down to 1 - then I get this page:
Capture.PNG
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
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Respond URL - Bad Ticket

Post by abrist »

Hmmm, we may need to do a remote to really hunt this down . . . .
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: Respond URL - Bad Ticket

Post by BanditBBS »

You know me, always willing....
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: Respond URL - Bad Ticket

Post by abrist »

You available now?
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