Unable to send arguments to remote host with NRPE


#1

Greetings,

I’m new to Nagios and I’m wondering what I might be missing after having read the documentation, downloaded, compiled and installed Nagios, plugins and NRPE.

Anyway, I’m trying to get command line arguments passed to a remote server (Fedore Core 7) from my Nagios server (Fedore Core 5) using *cfg files. Here’s what I have:

nagios version 3.02
nagios plugins version 1.4.14
nrpe versioin 2.12

nrpe daemon compiled with:

–enable-ssl
–enable-command-args

AND

dont_blame_nrpe=1 in nrpe.cfg on remote and Nagios server (just in case).

This works from the command line of the Nagios server as nagios user:

check_nrpe -H remote_server
NRPE v2.12

This also works from the command line as nagios user:

check_nrpe -H remote_server -c check_load -a 15,10,5 30,25,20
OK - load average: 0.00, 0.02, 0.00|load1=0.000;15.000;30.000;0; load5=0.020;10.000;25.000;0; load15=0.000;5.000;20.000;0;

Now for the service configuration on the Nagios server:

define service{
use generic-service ; this is the template that gets installed with the quick start guide
host_name remote_server
service_description Current Load
check_command check_nrpe!check_load!15,10,5!30,25,20
check_interval 1
}

nrpe.cfg on monitored server:

dont_blame_nrpe=1

command[check_load]=/usr/local/nagios/libexec/check_load -w $ARG1$ -c $ARG2$
#command[check_load]=/usr/local/nagios/libexec/check_load -w 15,10,5 -c 30,25,20

When I look at the check_load service for remote_server in the web interface I see:

Warning threshold must be float or float triplet!
Usage:check_load -r] -w WLOAD1,WLOAD5,WLOAD15 -c CLOAD1,CLOAD5,CLOAD15

I see this in /usr/local/nagios/var/nagios.log:

SERVICE NOTIFICATION: nagiosadmin;remote_server;Current Load;UNKNOWN;notify-service-by-email;Warning threshold must be float or float triplet!

Might anyone be able to point me in the right direction to troubleshoot this? Is there any easy way to see how the actual command and arguments get expanded?

thanks


#2

I may have gotten something wrong but to me it looks like you need a rewrite as it expands to:

usr/local/nagios/libexec/check_load -w check_load -c 15,10,5