Adding acknowledgement links to notifications

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
justin
Posts: 10
Joined: Mon Mar 22, 2010 9:07 am

Adding acknowledgement links to notifications

Post by justin »

We ran into a snag in our Nagios Core migration to Nagios XI. We used to send detail and acknowledgment links in our emails.

Our acknowledgment links used to look like this:

Host: http://nagios.mybusiness.com/nagios/cgi ... host=$HOST$
Service: http://nagios.mybusiness.com/nagios/cgi ... ERVICENAME$

Now it looks like they should:

Host: http://nagios.mybusiness.com/nagiosxi/i ... host=$HOST$
Service: http://nagios.mybusiness.com/nagiosxi/i ... ERVICENAME$

These links work. However, The problem is, the server used to authenticate the user automatically, now we just get an error saying your session has expired unless you've logged into the system recently. Is it possible to get an authentication request from the server before just denying the user? Otherwise, is there another link I should use instead?

Thanks,
Justin
tonyyarusso
Posts: 1128
Joined: Wed Mar 03, 2010 12:38 pm
Location: St. Paul, MN, USA
Contact:

Re: Adding acknowledgement links to notifications

Post by tonyyarusso »

There is another link format you can use to authenticate. Take a look at my response on http://support.nagios.com/forum/viewtopic.php?f=6&t=407 , particularly the CODE offset. Then just put your usual paths in the redirect= portion to go to them after authenticating.
Tony Yarusso
Technical Services
___
TIES
Web: http://ties.k12.mn.us/
justin
Posts: 10
Joined: Mon Mar 22, 2010 9:07 am

Re: Adding acknowledgement links to notifications

Post by justin »

Thanks! I actually left out the static login options. That way our users could login independently to acknowledge their pages.


I thought that was working, but after we login, it was dropping anything behind the tailing ampersand.

Here's an example: "http://nagios.mycompany.com/nagiosxi/lo ... ice=Serial Interface Stats"

It would send you to the login page with the full URL including all ampersands.

Once you log in you would be sent to this cropped url: "http://nagios.mycompany.com/nagiosxi/in ... cmd_typ=34"

Notice that everything behind the ampersand trailing "cmd_typ=34" is missing. In order to retain the other information on the links, I had to replace the trailing ampersands with "%26". This made the links look like this:

"http://nagios.mycompany.com/nagiosxi/lo ... ice=Serial Interface Stat"

That ultimately redirects correctly and everything appears to be working happily!

Thanks again for your help!
tonyyarusso
Posts: 1128
Joined: Wed Mar 03, 2010 12:38 pm
Location: St. Paul, MN, USA
Contact:

Re: Adding acknowledgement links to notifications

Post by tonyyarusso »

Ah, good catch on escaping the &s. Glad it's working for you!
Locked