[Nagiosplug-help] NRPE Help

Andreas Ericsson ae at op5.se
Sun Feb 20 08:56:28 CET 2005


Aaron Carr wrote:
> I'm using Nagios 1.2, NRPE 2.0, Plugins 1.4, and both local and remote
> hosts are Fedora Core 2.
> 
> I'm having issues getting NRPE to report values.
> 
> Here's what I've tried.
> 
> in checkcommands.cfg
> 
> # 'check_nrpe' command definition
> define command{
>         command_name    check_nrpe
>         command_line    $USER1$/check_nrpe -H $HOSTADDRESS$ -w $ARG1$ -c $ARG2$
>         }
> 

This won't work. If you want to pass arguments, you'll need to do 
something like this;

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

> in services.cfg
> 
> # Check Load Service definition
> define service{
>         use                             generic-service
>         host_name                       Hermes
>         service_description             Load
>         is_volatile                     0
>         check_period                    24x7
>         max_check_attempts              3
>         normal_check_interval           5
>         retry_check_interval            2
>         contact_groups                  linux-admins
>         notification_interval           60
>         check_command                   check_nrpe!check_load -H
> $HOSTADDRESS$ -w 5.0,4.0,3.0 -c 10.0,6.0,4.0
>         }
> 

This is also wrong. You need to put
check_command check_nrpe!check_load!5.0,4.0,3.0!10.0,6.0,4.0
for it to work, assuming you're using the command from above.

> Then I get "(No output returned from plugin)" on the web interface.
> 
> I'm sure I've botched some syntax somewhere.  This is the first nrpe
> service I've tried to define.  Can anyone point our what I've done
> wrong?
> 

You need to think a little more about how the commands are passed back 
and forth. The above example will work, so consider this a more general 
advice for the future.

-- 
Andreas Ericsson                   andreas.ericsson at op5.se
OP5 AB                             www.op5.se
Lead Developer




More information about the Help mailing list