NRPE with user-supplied args: NRPE doesn't seem to get args

Guy Waugh gwaugh at scu.edu.au
Fri May 6 01:33:08 CEST 2005


Hi again,

Thanks to Steve Shipway for pointing out this:

# 'check_nrpe' command definition
 >define command{
 >         command_name    check_nrpe
 >         command_line    $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$
 >         }

 > check_command                   check_nrpe!check_users!5!10


This is your problem.  You have defined the command with ONE argument, 
but you are calling it with THREE.  Therefore, this command will expand 
up to be

$USER1$/check_nrpe -H $HOSTADDRESS$ -c check_users

but with no additional parameters.  You need

command_line    $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$ -a $ARG2$ 
$ARG3$

for this to work.

Steve

------------

This does indeed work. I actually added up to $ARG6$ after the '-a' to 
deal with plugins that take more arguments.

Regards,
Guy.



Guy Waugh wrote:
> Hi there,
> 

<snip>



-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.
Get your fingers limbered up and give it your best shot. 4 great events, 4
opportunities to win big! Highest score wins.NEC IT Guy Games. Play to
win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list