Page 1 of 1

command check_nrpe doesn't exist

Posted: Tue May 24, 2016 2:54 am
by Orenxx2
Hey,

I installed and configured nagios core on centos7, and installed nrpe plugin.
Also installed plugins and nrpe on client (ubuntu).
there is no check_nrpe command under /usr/local/nagios/libexec. I assume that nrpe installation bring this command, so what could be the problem?

Oren.

Re: command check_nrpe doesn't exist

Posted: Tue May 24, 2016 9:41 am
by teh0015
check /usr/lib/nagios/plugins/ or /usr/lib64/nagios/plugins

Re: command check_nrpe doesn't exist

Posted: Tue May 24, 2016 11:33 am
by bwallace
Refer to this doc for 'retracing' your steps regarding the NRPE install on Ubuntu.
http://sites.box293.com/nagios/guides/n ... -04---nrpe
Be sure to run through the troubleshooting test at the end of the doc. If that fails, then focus your efforts on the Client machine (Ubuntu) first = confirm NRPE is up and listening there before doing any tests from the Nagios server.

Also refer to this doc, section "Test the NRPE daemon locally"
https://assets.nagios.com/downloads/nag ... e/NRPE.pdf

Hope this helps, let us know of the outcome, thanks.

Re: command check_nrpe doesn't exist

Posted: Tue May 24, 2016 11:25 pm
by Box293
I suspect you are after this if it's on your core server:

http://sites.box293.com/nagios/guides/n ... 4---GitHub

Re: command check_nrpe doesn't exist

Posted: Wed May 25, 2016 2:33 am
by Orenxx2
forgot to say im trying the installation without xinetd, is it possible?

Re: command check_nrpe doesn't exist

Posted: Wed May 25, 2016 11:58 am
by tgriep
Yes, after installing the NRPE agent, you could run the NRPE Agent in daemon mode by using the -d option like the example below.

Code: Select all

/usr/local/nagios/bin/nrpe -c /usr/local/nagios/etc/nrpe.cfg -d
In the nrpe.cfg file, you would have to add the nagios servers IP address to the allowed_hosts and then you can start the NRPE Agent in daemon mode.
On which server you could not find the check_nrpe plugin?

Re: command check_nrpe doesn't exist

Posted: Thu Jun 16, 2016 4:17 am
by Orenxx2
(I had break from the project due working preferences)

after installing successfully plugins and nrpe on Client (ubuntu) and install nagios, plugins and nrpe on Server (CentOS)

seemed to be problem only with nrpe on server:
I couldnt find the command on my server, i found it under "/nagios/nrpe-2.15/src/check_nrpe" also the config file exist under "/nagios/nrpe-2.15/sample-config/nrpe.cfg".

when i run: "/nagios/nrpe-2.15/src/check_nrpe -H <ip>"
recieved: "CHECK_NRPE: Error - Could not complete SSL handshake"
I think its related for the idea that i recieve no result when i run: "netstat -at | grep nrpe"

the steps i done after downloading nrpe are:
yum install openssl-devel
./configure
make all
make install-daemon


Please advice!
thanks!
Oren.

Re: command check_nrpe doesn't exist

Posted: Thu Jun 16, 2016 9:54 am
by rkennedy
When you run check_nrpe on the nagios machine, what is outputted to /var/log/messages on the client machine? There will usually be some debugging that helps. Perhaps you need to modify the allowed_hosts section?

Re: command check_nrpe doesn't exist

Posted: Mon Jun 20, 2016 9:27 am
by Orenxx2
run from my nagios server: "/nagios/nrpe-2.15/src/check_nrpe -H <client_ip>" and receive: "CHECK_NRPE: Error - Could not complete SSL handshake."
/var/log/messages print nothing when i run the check_nrpe command.

The nrpe.cfg modified to contain the the server ip on the client config file and as well in the client ip in the server config file.

when i run: "sudo /usr/local/nagios/bin/nrpe -c /nagios/nrpe-2.15/sample-config/nrpe.cfg" (to run the nrpe as a daemon as well as one of the comment above said) i get the following output:

Code: Select all

NRPE - Nagios Remote Plugin Executor
Copyright (c) 1999-2008 Ethan Galstad ([email protected])
Version: 2.15
Last Modified: 09-06-2013
License: GPL v2 with exemptions (-l for more info)
SSL/TLS Available: Anonymous DH Mode, OpenSSL 0.9.6 or higher required

***************************************************************
** POSSIBLE SECURITY RISK - TCP WRAPPERS ARE NOT AVAILABLE!  **
**      Read the NRPE SECURITY file for more information     **
***************************************************************

Usage: nrpe [-n] -c <config_file> [-4|-6] <mode>

Options:
 -n            = Do not use SSL
 <config_file> = Name of config file to use
 -4            = use ipv4 only
 -6            = use ipv6 only
 <mode>        = One of the following operating modes:
   -i          =    Run as a service under inetd or xinetd
   -d          =    Run as a standalone daemon
   -d -s       =    Run as a subsystem under AIX

Notes:
This program is designed to process requests from the check_nrpe
plugin on the host(s) running Nagios.  It can run as a service
under inetd or xinetd (read the docs for info on this), or as a
standalone daemon. Once a request is received from an authorized
host, NRPE will execute the command/plugin (as defined in the
config file) and return the plugin output and return code to the
check_nrpe plugin.
maybe it didnt succeed? does the following mean its running? or how can i check if its running and restart it..

Code: Select all

ps -ef | grep nrpe
oren     85360      1  0 14:27 ?        00:00:00 /usr/local/nagios/bin/nrpe -c /nagios/nrpe-2.15/sample-config/nrpe.cfg -d

Re: command check_nrpe doesn't exist

Posted: Mon Jun 20, 2016 4:17 pm
by lmiltchev
In order to install the NRPE plugin, daemon, and a sample daemon config file, you need to run:

Code: Select all

make install-plugin
make install-daemon
make install-daemon-config
Please, review our official NRPE documentation here:
https://assets.nagios.com/downloads/nag ... e/NRPE.pdf

Is the nagios server's IP address added to the "allowed_hosts" line in the nrpe.cfg file on the client machine? Did you restart the nrpe service after making the change?

Note: You can kill the NRPE process with "kill -9 <PID>", then start the NRPE daemon by running:

Code: Select all

/usr/local/nagios/bin/nrpe -c /full/path/to/the/nrpe.cfg -d