check_command $ARGx$ with SPACE characters ?

Thomas Zahari thza at whatevermobile.com
Tue Oct 8 16:53:06 CEST 2002


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




More information about the Users mailing list