$HOSTNOTESURL$ being mangled (removing '&' char).

Eli Stair estair at ilm.com
Tue Feb 28 19:02:09 CET 2006


This was resolved, the illegal macro char in nagios.cfg was the cause.

/eli

----

Thanks to Michael Alger:

Check your illegal_macro_output_chars setting in the main Nagios 
configuration file. Since & is a shell metacharacter, it is included in 
the set by default. The example configuration doesn't explicitly mention 
the HOSTNOTESURL macro, but it makes sense it would be applied to 
everything used in the notification commands.

----


Eli Stair wrote:
> 
> I've got several different ext host/svc info links set up to various 
> other pages.  That's great, and I'm using $HOSTNOTESURL$ in alert 
> emails.  $HOSTNOTESURL$ seems to be stripping out the ampersand "&" 
> during expansion:
> 
> 
> extended host info defined in config as:
> notes_url 
> https://monitor/ganglia/?r=day&c=Opteron_2.4_GHz_Single_Core_8G_Deathstar_Cluster&h=$HOSTNAME$.domainname.com 
> 
> 
> This expands in the email alert (...EXTENDED HOST 
> INFO:\n\"$HOSTNOTESURL$...) as:
> 
> EXTENDED HOST INFO:
> https://monitor/ganglia/?r=dayc=Opteron_2.4_GHz_Dual_Core_16G_Deathstar_Clusterh=hostname.domainname.com 
> 
> 
> I've double-checked the printf to make sure & gets through un-escaped 
> (it does), and the "Extra Host Notes" link generated by the CGI's is 
> rendered properly:
> 
> 
> https://monitor/ganglia/?r=day&c=Opteron_2.4_GHz_Dual_Core_16G_Deathstar_Cluster&h=hostname.domainname.com 
> 
> 
> 
> Any input on this?  It looks to me like the chars are just being 
> stripped when it's expressed in the alert.  I can properly printf & 
> otherwise (I generate a link to acknowledge the outage in the same alert).
> 
> Thanks,
> 
> /eli
> 
> 
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by xPML, a groundbreaking scripting language
> that extends applications into web and mobile media. Attend the live 
> webcast
> and join the prime developer group breaking into this new coding territory!
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users
> ::: Please include Nagios version, plugin version (-v) and OS when 
> reporting any issue. ::: Messages without supporting info will risk 
> being sent to /dev/null
> 



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list