check_command $ARGx$ with SPACE characters ?
Freddy Frouin
freddy.frouin at fluxus.net
Tue Oct 8 17:09:20 CEST 2002
Hi,
I'm not sure to understand really why it goes like you said, yet
did you simply try to use "$ARG2$" instead of '$ARG2$'. Maybe
it's just a stupid suggestion, yet i'm using " char there, and
I've no problem like this...
Did you tryed to run you perl script like this to see what happend:
./check_fogger 1234 'test param1 param2'
Maybe it is just the shell which is used to start this command
./check_fogger 1234 'test param1 param2' which do not recognize
char ' as a char to enclose arguments... What shell is using
the user starting nagios ?
'hope this help, Freddy.
On Tue, 8 Oct 2002 16:53:06 +0200
"Thomas Zahari" <thza at whatevermobile.com> wrote:
>
> Hello Nagios-Users,
>
> I try to use a check_command with a $ARGx$. But the argument can have space
> characters in it.
>
> I tried so much but nothing works.
>
> My config:
>
> ----------------------------------------------------------------------------
> --
> # 'check_fugger' command definition
> define command{
> command_name check_fugger
> command_line $USER2$/fugger_check.pl $HOSTADDRESS$ $ARG1$
> '$ARG2$'
> }
>
> # Service definition
> define service{
> use generic-service ; Name of
> service template to use
>
> host_name server
> service_description Service1
> is_volatile 0
> check_period 24x7
> max_check_attempts 3
> normal_check_interval 10
> retry_check_interval 1
> contact_groups linux-admins
> notification_interval 20
> notification_period 24x7
> notification_options w,u,c,r
>
> check_command check_fugger!1234!test param1 param2
> }
>
> # Service definition
> define service{
> use generic-service ; Name of
> service template to use
>
> host_name server
> service_description Service2
> is_volatile 0
> check_period 24x7
> max_check_attempts 3
> normal_check_interval 10
> retry_check_interval 1
> contact_groups linux-admins
> notification_interval 20
> notification_period 24x7
> notification_options w,u,c,r
>
> check_command check_fugger!2345!test param1
> }
>
> ----------------------------------------------------------------------------
>
> My fugger_check.pl script should get something like:
>
> ARGV[0]=192.168.1.1
> ARGV[1]=1234
> ARGV[2]=test param1 param2
>
> or
>
> ARGV[0]=192.168.1.1
> ARGV[1]=2345
> ARGV[2]=test param1
>
> but the perl script got this:
>
> ARGV[0]=192.168.1.1
> ARGV[1]=1234
> ARGV[2]='test
> ARGV[3]=param1
> ARGV[4]=param2'
>
> why ?????????
>
>
> I hope you can help me !
>
> Thank you !!
> Thomas
>
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users
>
--
Freddy Frouin
Responsable Supervision
Fluxus - British Telecom
30, rue du Château des Rentiers
75013 Paris
Tél: +33 (0)1 44 97 70 00
Fax: +33 (0)1 44 97 70 07
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
More information about the Users
mailing list