Notes / Action URL Embedded URLs

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
User avatar
rseiwert
Posts: 196
Joined: Wed Jun 22, 2011 10:33 pm
Location: Somewhere between Here and Now

Notes / Action URL Embedded URLs

Post by rseiwert »

I have been pulling my hair out trying to figure out a good way to get links into status. I have several items with the Action URL set. I have other custom alerts with embedded URLs for more details on the alert just after the first line. In Nagios Core these show up no problem. Can I get this functionality in Nagios XI?
Last edited by rseiwert on Tue Aug 16, 2011 12:55 pm, edited 1 time in total.
Grumpy Olde IT Guy
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Notes / Action URL Embedded URLs

Post by mguthrie »

Can you send me a sample of the plugin output? If you're getting the link to show up in Core you got farther than I did ; )
User avatar
rseiwert
Posts: 196
Joined: Wed Jun 22, 2011 10:33 pm
Location: Somewhere between Here and Now

Re: Notes / Action URL Embedded URLs

Post by rseiwert »

There is a "Escape HTML Tags" you need to set in the cgi.cfg to enable clickable hyperlinks from the output of the plugins for Nagios core. I have only one of my custom alerts setup in XI at this time. My custom alert queries the weather service and the link is their full text of the alert. I need NOAA to issue a weather alert for my area to get a true example but the link is something like <a href=http://www.spc.noaa.gov/products/outloo ... ml>Weather Alert<a>. This shows up as a hyperlink in core but I have to pick the URL out and copy and paste into a new tab in XI.

Escape HTML Tags Option
Format: escape_html_tags=[0/1]
Example: escape_html_tags=1
This option determines whether or not HTML tags in host and service (plugin) output is escaped in the CGIs. If you enable this option, your plugin output will not be able to contain clickable hyperlinks.

The Action and Note URLs I set on the last tab of the configuration manager. They show up in Core as icons I can click on. I cannot find where they show up in XI. Let me know if you need a screenshot of these icons.
Grumpy Olde IT Guy
agriffin
Posts: 876
Joined: Mon May 09, 2011 9:36 am

Re: Notes / Action URL Embedded URLs

Post by agriffin »

I was able to recreate your issue after changing that configuration variable. Unfortunately, this is currently unsupported in XI to protect against cross-site scripting. You can open a feature request on our bug tracker if you'd like to see this in a future release.
User avatar
rseiwert
Posts: 196
Joined: Wed Jun 22, 2011 10:33 pm
Location: Somewhere between Here and Now

Re: Notes / Action URL Embedded URLs

Post by rseiwert »

Notes URL and Action URL. These are defined on hosts and services and are very useful. Can these be enabled in XI?

Embedded and/or html formatted output would be nice but you are right about cross scripting.. Still very useful in the 2 click to diagnose mentality I have.
Grumpy Olde IT Guy
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Notes / Action URL Embedded URLs

Post by mguthrie »

I agree, I think this is a feature that we started on, and then got lost in the woodwork somewhere. I'll take a look at adding this to the developer TODO.
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Notes / Action URL Embedded URLs

Post by mguthrie »

New component added:
http://exchange.nagios.org/directory/Ad ... nt/details

Thanks for the input!
User avatar
rseiwert
Posts: 196
Joined: Wed Jun 22, 2011 10:33 pm
Location: Somewhere between Here and Now

Re: Notes / Action URL Embedded URLs

Post by rseiwert »

Was all excited about this but after installing was disappointed. I have generic note urls setup for all hosts which will link be back from core to xi.

https://$hostaddress$:1311 is the link it attempts
or
http://nagios.vca.com/nagiosxi/includes ... =$HOSTNAME$

Obviously $HOSTNAME$ and $HOSTADDRESS$ are critical to substitute but all should.
Grumpy Olde IT Guy
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Notes / Action URL Embedded URLs

Post by mguthrie »

So you're saying the url fields aren't interpreting the macros? They're literally pointing to: https://$hostaddress$:1311 ?

I'll have to check and see why that is, but it wouldn't be that hard to fix if that's what's needed. It might get a little more if it needs to interpret custom macros, that might be for a later revision.
User avatar
rseiwert
Posts: 196
Joined: Wed Jun 22, 2011 10:33 pm
Location: Somewhere between Here and Now

Re: Notes / Action URL Embedded URLs

Post by rseiwert »

yuppers...
Grumpy Olde IT Guy
Locked