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
Issue with the ampersand in URLs
Re: Issue with the ampersand in URLs
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.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Re: Issue with the ampersand in URLs
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.
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
We'll take a look at correcting this for the 1.7 release.
Re: Issue with the ampersand in URLs
An idea about the release date?
Re: Issue with the ampersand in URLs
Here's a patched version of the CCM component that should take care of the issue.
You do not have the required permissions to view the files attached to this post.