check_nrpe


#1

Hi Nagios users,

I have a small problem, wasn’t able to figure out where am I going wrong.

I have Nagios daemon/plugins on ‘Linux1’ machine and the NRPE daemon is
running on ‘Linux2’ box.
The check_nrpe plugin works fine at the command-line but
When Nagios is started, I see the following message isaying that
(no output returned from plugin)
on monitoring host:
services.cfg is defined as

Service definition

define service{
use generic-service ; Name of service template to use

    host_name                       remote host
    service_description             LOAD
    is_volatile                     0
    check_period                    24x7
    max_check_attempts              3
    normal_check_interval           5
    retry_check_interval            1
    contact_groups                  unix-admins
    notification_interval           120
    notification_period             24x7
    notification_options            c,r
    check_command                   check_nrpe!check_load -w 15,10,5 -c 30,25,20

}
and in checkcommands.cfg
define command{
command_name check_nrpe
command_line /usr/local/nagios/libexec/check_nrpe -H $HOSTADDRESS$ -c $ARG1$
}

Can anyone tell me what mistake I’m doing. Why is it not working without
any hardcoding.

Thanks for your time in advance
abcd


#2

Per the nrpe README:
define service{
host_name someremotehost
service_description someremoteservice
check_command check_nrpe!yourcommand

you have added to this -w 15,10,5 -c 30,25,20 which is not correct.
On the remote host, you would then have this according to the included nrpe.cfg examples:
command[yourcommand]=/usr/local/nagios/libexec/yourcommand -w 15,10,5 -c 30,25,20