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

Eli Stair estair at ilm.com
Mon Feb 27 22:51:36 CET 2006


I'm posting this to -devel after hearing no input from -users since 
Friday.  I don't see anything obvious in the way HOSTNOTESURL is handled 
in utils.c, and am out of my league enough to not be able to track it 
further in the source.  In my tests the URL is always written properly 
in the "Extra Host Notes" entry in the CGI's, but ampersand is always 
ignored when expanded in the alert (\& does nothing different).

If there's anything I can provide to be more clear or debug le tme know.

Regards,

/eli

<--- include:


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




More information about the Developers mailing list