Hi,
Apologies if this is covered here somewhere, but I can't seem to get urlize working completely. I've follow the various suggestions on the web, to create the link, and whilst I can see the html code being generated, it is never actually clickable.
I'm running 3.4.3 (yes I know it's a little old). Have the following:
main commands file:
# 'check_ping' command definition
define command{
command_name check_ext_ping
command_line $USER1$/urlize "https://<nagios server>/nagios/cgi-bin/traceroute.cgi?$HOSTADDRESS$" $USER1$/check_ping -H $HOSTADDRESS$ -w 150,25% -c 1000,50% -p 5
}
Then in the check for the host:
define service{
use generic-service
host_name <monitor host>
service_description Traceroute Ping
check_command check_ext_ping
}
In the status detail page, I see the check,
Traceroute Ping
Notifications for this service have been disabled
OK 07-08-2016 10:01:27 0d 16h 28m 56s 1/2 <A href="https://<nagios server>/nagios/cgi-bin/traceroute.cgi?xx.xx.xx.xx">PING OK - Packet loss = 0%, RTA = 0.39 ms</A>
And if I click into I get, ie in Service State Information:
Status Information: <A href="https://<nagios server>/nagios/cgi-bin/traceroute.cgi?xx.xx.xx.xx">PING OK - Packet loss = 0%, RTA = 0.37 ms</A>
But at no point are any of these actually clickable. I know the traceroute cgi works and generates the output I'd like, but was hoping that it would just provide the link to click on.
Am I doing something wrong?
Cheers,
Richard
Creating clickablie links - urlize
Re: Creating clickablie links - urlize
Take a look at your nagios.cfg file, specifically this field -
If any of the characters you're using are marked as 'illegal' remove them.
One other file to look at is cgi.cfg, check this field -
Should be set at 0.
Then restart nagios, and it should be working as expected.
Code: Select all
illegal_macro_output_chars=`~$&|'"<>
One other file to look at is cgi.cfg, check this field -
Code: Select all
escape_html_tags=1
Then restart nagios, and it should be working as expected.
Former Nagios Employee
Re: Creating clickablie links - urlize
Thank you, it was the escape_html_tags that did the trick.
Cheers,
Richard
Cheers,
Richard
Re: Creating clickablie links - urlize
Is it alright if we close this thread and mark the issue as resolved?
Former Nagios employee
https://www.mcapra.com/
https://www.mcapra.com/