Page 1 of 1
Issue with the ampersand in URLs
Posted: Mon Feb 18, 2013 10:55 am
by fao
Hello,
We're having issue with the ampersand sign when used in action_url inside a service definition. The ampersand is removed and the url is not correctly transmitted to the browser.
How can we sort it out?
Thanks
Re: Issue with the ampersand in URLs
Posted: Mon Feb 18, 2013 11:04 am
by abrist
There was a bug in 2012r1.5. If you have not made too many changes, you can roll your snapshot back to a config before the update and then update to the newest version (1.6). Otherwise, upgrade to 1.6 and fix the service checks with the issue.
Re: Issue with the ampersand in URLs
Posted: Tue Feb 19, 2013 7:13 am
by fao
Upgrading to 1.6 hasn't solved the issue.
in CCM, I've configured a service with this action url : /nagiosgraph/cgi-bin/show.cgi?host=$HOSTNAME$&service=$SERVICEDESC$' onMouseOver='showGraphPopup(this)' onMouseOut='hideGraphPopup()' rel='/nagiosgraph/cgi-bin/showgraph.cgi?host=$HOSTNAME$&service=$SERVICEDESC$, but the resulting configuration in the file is as follow :
###############################################################################
#
# Service configuration file
#
# Created by: Nagios QL Version 3.0.3
# Date: 2013-02-19 08:39:29
# Version: Nagios 3.x config file
#
# --- DO NOT EDIT THIS FILE BY HAND ---
# Nagios QL will overwite all manual settings during the next update
#
###############################################################################
define service {
host_name HQLTEST1
service_description check_swap
use local-service
display_name check_swap
check_command check_local_swap!20!10!!!!!!
action_url /nagiosgraph/cgi-bin/show.cgi?host=$HOSTNAME$&service=$SERVICEDESC$' onMouseOver='showGraphPopup(this)' onMouseOut='hideGraphPopup()' rel='/nagiosgraph/cgi-bin/showgraph.cgi?host=$HOSTNAME$&service=$SERVICEDESC$
register 1
}
###############################################################################
#
# Service configuration file
#
# END OF FILE
#
###############################################################################
You can see that the "&" character is being translated as "&" and I have to correct it manually in order to get it working.
Re: Issue with the ampersand in URLs
Posted: Tue Feb 19, 2013 10:09 am
by mguthrie
We'll take a look at correcting this for the 1.7 release.
Re: Issue with the ampersand in URLs
Posted: Tue Feb 19, 2013 10:12 am
by fao
An idea about the release date?
Re: Issue with the ampersand in URLs
Posted: Tue Feb 19, 2013 10:23 am
by mguthrie
Here's a patched version of the CCM component that should take care of the issue.