check_nrpe user supplied arguements

I’m trying to setup a command on our NRPE box (192.168.203.128) to accept user supplied arguments. In the nrpe.cfg file I have defined a command as:

I have already set the dont_blame_nrpe to 1 and compiled the nrpe daemon with –enable-command-args

On our NAGIOS server (192.168.203.129) I have a host and service definition setup:

define host{
        use                     linux-server
        host_name               nfs_server
        alias                   NFS Server
        address 192.168.203.128
}

define service{
        use                             local-service
        host_name                       nfs_server
        service_description             PING - Gateway
        check_command                   check_nrpe!check_ping_test!192.168.203.2
}

What I am confused about is the check_command above, when nagios processes this I get the following on the service detail screen under Status Information

(3000.0,80%) must be an integer percentage
check_ping: Could not parse arguments
Usage:check_ping -H <host_address> -w ,% -c ,%
-p packets] -t timeout] -4

However, if I call the following from the /usr/local/nagios/libexec directory, it works perfectly:

./check_nrpe -H 192.168.203.128 -c check_ping_test -a 192.168.203.2 PING OK - Packet loss = 0%, RTA = 0.21 ms|rta=0.211000ms;3000.000000;5000.000000;0.000000 pl=0%;80;100;0

It seems to be putting the 192.168.203.2 address I want to check in the -w field, but I have no idea why its doing this because the command line substitutes it right but calling from nagios does not, the 192.168.203.2 should go in the host field. I’ve tried enabled debugging on NRPE and Nagios to see if I could see how its calling check_ping but cannot. Any help is appreciated, this is driving me nuts.

Argh, nvm, I didn’t have the check_nrpe command on my NAGIOS server setup right, it was

define command {
        command_name    check_nrpe
        command_line    $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$
}

I needed to add the “-a $ARG2$” to the end of the command_line variable to get

define command {
        command_name    check_nrpe
        command_line    $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$ -a $ARG2$
}

Then I just called the service check_command as normal