check_ftp on check_nrpe..

Rob Moss robmossrm at aol.com
Thu Sep 15 11:44:31 CEST 2005


Elizar M. Palad wrote:

>
> Hi all! Me again! :-)
>  
>  
> I just installed nrpe both on local nagios machine and
> to the remote host.
>  
> I get a "CHECK_NRPE: Received 0 bytes. Are we allowed to connect to 
> the host? "
> with these definition:
>  
> define service{
>         use                             generic-service         ; Name 
> of service template to use
>         host_name                       2 FTPTEST
>         check_command              check_nrpe!check_ftp
>         }
>  
> define command{
>         command_name    check_nrpe
>         command_line    /usr/local/nagios/libexec/check_nrpe -H 
> $HOSTADDRESS$
>         }
>  

Here's your problem, you aren't passing the arguments to check_nrpe, 
only the Hostname

The 'command_line' should read something like this:


command_line    $USER1$/check_nrpe -H $HOSTADDRESS$ -p 5666 -t 30 -c $ARG1$


The check "check_ftp" must also be defined in your NRPE config file nrpe.cfg

If this does not make sense to you, then you need to read the manual on 
how NRPE works

> <>Then i get: Socket timeout 10sec with this definition:
>  
> define service{
>         use                             generic-service         ; Name 
> of service template to use
>         host_name                       2 FTPTEST
>         check_command              check_nrpe!ftptest!21!check_ftp
>         }
>  
> define command{
>         command_name    check_nrpe
>         command_line    /usr/local/nagios/libexec/check_nrpe -H $ARG1$ 
> -p $ARG2$ -c $ARG3$
>         }
>
> could someone guide me on this one? Thanks in advance! 
>

This looks better but you are still sending some incorrect arguments, 
see above.  You need to understand how the flags work such as -H and how 
the ! separator works with $ARGx$ arguments.

rob.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20050915/ef1c91cd/attachment.html>


More information about the Users mailing list