[Nagiosplug-help] problem using nrpe

Andreas Baetz lac01 at web.de
Thu Mar 20 00:49:05 CET 2003


On Thursday 20 March 2003 00:06, Cyrille Mertes wrote:
> Hi,
>
> I try to use nrpe to run check_proc remotely.
>
> Here are what I did exactly :
>
> On the nagios host :
>
> 1) Installed nrpe source (./configure, make all)
>
> 2) cp check_nrpe in my libexec directory
>
> 3) defined in  checkcommands.cfg :
>
> define command{
>         command_name    check_nrpe
>         command_line     /virtual/nagios/libexec/check_nrpe -H
> $HOSTADDRESS$ -c $ARG1$
>         }
>
> 4) defined in services.cfg
>
> define service{
>         use                             generic-service
>         host_name                       guo
>         service_description             Sympa
>         check_command                   check_nrpe!check_sympa
>         }
>
> On the remote host :
>
> 1) Installed nrpe source (./configure, make all)
>
> 2) cp check_nrpe and check_proc in /usr/sbin
>
> 3) Created nrpe.cfg in /etc with :
>
> server_port=5666
> allowed_hosts=127.0.0.1
> nrpe_user=nagios
> nrpe_group=nagios
> debug=1
> command_timeout=60
> command[check_sympa]=/usr/sbin/check_procs -w 1 -c 1 -C sympa.pl
>
> 4) created /etc/xinetd.d/nrpe with :
>
> # default: on
>         # description: NRPE
>         service nrpe
>         {
>                 flags           = REUSE
>                 socket_type     = stream
>                 wait            = no
>                 user            = nagios
>                 server          = /usr/sbin/check_nrpe
>                 server_args     = -c /etc/nrpe.cfg --inetd
>                 log_on_failure  += USERID
>                 disable         = no
>                 only_from       = 207.139.174.2
>         }
>
>
> 5) restart xinetd
>
> If I tried this command on the nagios host :
>
> /virtual/nagios/libexec/check_nrpe  -H guo.xxx.com -p 5666 -c check_sympa
>
> CHECK_NRPE: Error receiving data from host.
>
> No firewall on the remote host.
>
> In the nagios web intrface, same error : CHECK_NRPE: Error receiving
> data from host.
>
> Someone know what's wrong ?

I think you should not use check_nrpe as the server, but nrpe. 
Maybe the allowed_hosts in nrpe.cfg should be set to your nagios host.
I do not start it with (x)inetd, but with nrpe -d /etc/nrpe.cfg. This way it works.

Andreas Baetz





More information about the Help mailing list