Nagios command not transmitting all arguments

Posted by markus on Server Fault See other posts from Server Fault or by markus
Published on 2011-10-20T11:22:38Z Indexed on 2012/06/12 10:42 UTC
Read the original article Hit count: 384

I'm using the following service to monitor our postgres db from nagios:

define service{
       use                             test-service         ; Name of servi$
       host_name                       DEMOCGN002
       service_description             Postgres State
       check_command                   check_nrpe!check_pgsql!192.168.1.135!test!test!test
       notifications_enabled           1
       }

On the remote machine I've configured the command:

command[check_pgsql]=/usr/lib/nagios/plugins/check_pgsql -H $ARG1$ -d $ARG2$ -l $ARG3$ -p $ARG4$

In the syslog I can see that command is executed, but there is only one argument transmitted:

Oct 20 13:18:43 DEMOSRV01 nrpe[1033]: Running command: /usr/lib/nagios/plugins/check_pgsql -H 192.168.1.134 -d  -l  -p 
Oct 20 13:18:43 DEMOSRV01 nrpe[1033]: Command completed with return code 3 and output: check_pgsql: Database name is not valid - -l#012Usage:#012check_pgsql [-H <host>] [-P <port>] [-c <critical time>] [-w <warning time>]#012 [-t <timeout>] [-d <database>] [-l <logname>] [-p <password>]
Oct 20 13:18:43 DEMOSRV01 nrpe[1033]: Return Code: 3, Output: check_pgsql: Database name is not valid - -l#012Usage:#012check_pgsql [-H <host>] [-P <port>] [-c <critical time>] [-w <warning time>]#012 [-t <timeout>] [-d <database>] [-l <logname>] [-p <password>]

Why are arguments 2,3 and 4 missing?

© Server Fault or respective owner

Related posts about debian

Related posts about postgresql