command check_nrpe doesn't exist

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Orenxx2
Posts: 4
Joined: Tue May 24, 2016 2:34 am

command check_nrpe doesn't exist

Post 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.
teh0015
Posts: 59
Joined: Tue Jul 07, 2015 9:07 am

Re: command check_nrpe doesn't exist

Post by teh0015 »

check /usr/lib/nagios/plugins/ or /usr/lib64/nagios/plugins
bwallace
Posts: 1146
Joined: Tue Nov 17, 2015 1:57 pm

Re: command check_nrpe doesn't exist

Post 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.
Be sure to check out the Knowledgebase for helpful articles and solutions!
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: command check_nrpe doesn't exist

Post by Box293 »

I suspect you are after this if it's on your core server:

http://sites.box293.com/nagios/guides/n ... 4---GitHub
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Orenxx2
Posts: 4
Joined: Tue May 24, 2016 2:34 am

Re: command check_nrpe doesn't exist

Post by Orenxx2 »

forgot to say im trying the installation without xinetd, is it possible?
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: command check_nrpe doesn't exist

Post 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?
Be sure to check out our Knowledgebase for helpful articles and solutions!
Orenxx2
Posts: 4
Joined: Tue May 24, 2016 2:34 am

Re: command check_nrpe doesn't exist

Post 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.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: command check_nrpe doesn't exist

Post 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?
Former Nagios Employee
Orenxx2
Posts: 4
Joined: Tue May 24, 2016 2:34 am

Re: command check_nrpe doesn't exist

Post 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 (nagios@nagios.org)
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
User avatar
lmiltchev
Former Nagios Staff
Posts: 13587
Joined: Mon May 23, 2011 12:15 pm

Re: command check_nrpe doesn't exist

Post 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
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked