[icinga-users] Bug in "Command Expansion for service"?

Stephane Bortzmeyer stephane at sources.org
Sat Jan 19 19:09:55 CET 2013


I experimented with the "Command Expansion for service" feature. I
have a service defined as:

define service{
        use    			        generic-service
        hostgroup_name                       Internet
	service_description             PING
        check_command                   check_ping!200.0,20%!400.0,35%
	notifications_enabled 0
        }

And if I see a host member of this group, I see on the Web interface:

Command Name	Command Line
To expand:	check_ping!200.0,20%00.0,35
check_ping	$USER1$/check_ping -H $HOSTADDRESS$ -w $ARG1$ -c $ARG2$ -p 5 $ARG3$
->	$USER1$/check_ping -H $HOSTADDRESS$ -w 200.0,20%00.0,35 -c (undefined) -p 5 (undefined)
Raw commandline	/usr/share/nagios/libexec/check_ping -H ping.demarcq.net -w 200.0,20%00.0,35 -c -p 5

But the raw command-line is incorrect and raises a syntax error:

% /usr/share/nagios/libexec/check_ping -H ping.demarcq.net -w 200.0,20%00.0,35 -c -p 5
check_ping: %s: Warning threshold must be integer or percentage!

 - -p
Usage:
check_ping -H <host_address> -w <wrta>,<wpl>% -c <crta>,<cpl>%
 [-p packets] [-t timeout] [-4|-6]




More information about the icinga-users mailing list