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

Michael Friedrich michael.friedrich at gmail.com
Mon Jan 21 21:25:44 CET 2013

On 19.01.2013 19:09, Stephane Bortzmeyer wrote:
> 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%
> To expand:	check_ping!200.0,20%00.0,35

looks like the second argument gets eaten by '!4' somehow, and instead 
added to the first argument string.

in which way are you using the command expansion? coming from extinfo 
ACTIVE url directly on the expansion, or added your own url GET params?

see here what i mean - 

maybe an encoding issue on the url?

> 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]
> ------------------------------------------------------------------------------
> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
> with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
> MVPs and experts. SALE $99.99 this month only -- learn more at:
> http://p.sf.net/sfu/learnmore_122912
> _______________________________________________
> icinga-users mailing list
> icinga-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/icinga-users

DI (FH) Michael Friedrich

mail:     michael.friedrich at gmail.com
twitter:  https://twitter.com/dnsmichi
jabber:   dnsmichi at jabber.ccc.de
irc:      irc.freenode.net/icinga dnsmichi

icinga open source monitoring
position: lead core developer
url:      https://www.icinga.org

More information about the icinga-users mailing list