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

Michael Friedrich michael.friedrich at gmail.com
Mon Jan 21 22:19:34 CET 2013


On 21.01.2013 21:55, Stephane Bortzmeyer wrote:
> On Mon, Jan 21, 2013 at 09:25:44PM +0100,
>   Michael Friedrich<michael.friedrich at gmail.com>  wrote
>   a message of 74 lines which said:
>
>> 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?
>
> Question not understood, sorry. I configured nothing, I just clicked
> on "View config" then on the command name.

Ok, View Config - Command Expansion -

Using the default check_ping definition

[--SNIP--]
# 'check_ping' command definition
define command{
         command_name    check_ping
         command_line    $USER1$/check_ping -H $HOSTADDRESS$ -w $ARG1$ 
-c $ARG2$ -p 5
         }

pasting the command into the empty line - works like expected.

To expand:	check_ping!200.0,20%!400.0,35%
check_ping	$USER1$/check_ping -H $HOSTADDRESS$ -w $ARG1$ -c $ARG2$ -p 5
->	$USER1$/check_ping -H $HOSTADDRESS$ -w 200.0,20% -c 400.0,35% -p 5
Raw commandline	/usr/lib/nagios/plugins/check_ping -H $HOSTADDRESS$ -w 
200.0,20% -c 400.0,35% -p 5
[--SNIP--]

different approach - localhost with ping.

[--SNIP--]
# 'check_ping' command definition
define command{
         command_name    check_ping
         command_line    $USER1$/check_ping -H $HOSTADDRESS$ -w $ARG1$ 
-c $ARG2$ -p 5
         }
define host {
         host_name       localhost
         use             generic-host
}
define service{
         host_name       localhost
         use             generic-service
         service_description     ping
         check_command   check_ping!200.0,20%!400.0,35%
}

View Config - Services - ping - click on the Commandline.

To expand:	check_ping!200.0,20%!400.0,35%
check_ping	$USER1$/check_ping -H $HOSTADDRESS$ -w $ARG1$ -c $ARG2$ -p 5
->	$USER1$/check_ping -H $HOSTADDRESS$ -w 200.0,20% -c 400.0,35% -p 5
Raw commandline	/usr/lib/nagios/plugins/check_ping -H localhost -w 
200.0,20% -c 400.0,35% -p 5
[--SNIP--]

Conclusio - cannot reproduce the issue.

Can you post the host, service and command defintion from your 
objects.cache so i can add the exact same values in my dev setup?




-- 
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