NRPE agent not working on Oracle Linux 7

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
hkang
Posts: 41
Joined: Tue Jan 05, 2016 4:34 pm

Re: NRPE agent not working on Oracle Linux 7

Post by hkang »

The libmcrypt and libmcrypt-devel libraries have been installed. Do I need to remove the old NRPE before re-installing it?
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: NRPE agent not working on Oracle Linux 7

Post by rkennedy »

Try re-running the install again, and post the result back to us.
Former Nagios Employee
hkang
Posts: 41
Joined: Tue Jan 05, 2016 4:34 pm

Re: NRPE agent not working on Oracle Linux 7

Post by hkang »

Here is the result of the re-installation:
Your system $PATH does not include /sbin and /usr/sbin. This is usually the result of installing GNOME rather than creating a clean system.
Adding /sbin and /usr/sbin to $PATH.
============================
Nagios Linux Agent Installer
============================

This script will install the Nagios Linux Agent by executing all necessary
sub-scripts.

IMPORTANT: This script should only be used on a clean installed system:

RedHat Enterprise, CentOS, Fedora, or Oracle
OpenSUSE or SUSE Enterprise
Ubuntu or Debian

Do NOT use this on a system running any other distro or that
does not allow additional package installation.

Do you want to continue? [Y/n] Y
Proceeding with installation...
Running './0-repos'...
Repos already configured - exiting.
RESULT=0
Running './1-prereqs'...
Prereqs already installed - skipping...
RESULT=0
Running './2-usersgroups'...
Users/groups already configured - skipping.
RESULT=0
Running './3-services'...
/etc/services already updated - skipping.
RESULT=0
Running './4-firewall'...
Firewall rules already configured - skipping.
RESULT=0
Running './A-subcomponents'...
Subcomponents already configured - skipping.
RESULT=0

##########################################################
### ###
### Nagios XI Linux Agent Installation Complete! ###
### ###
##########################################################

If you experience any problems, please attach the file install.log that was just created to any support requests.
hkang
Posts: 41
Joined: Tue Jan 05, 2016 4:34 pm

Re: NRPE agent not working on Oracle Linux 7

Post by hkang »

It seems that the nrpe binary doesn't exist still.
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

Re: NRPE agent not working on Oracle Linux 7

Post by jolson »

We'll need to removed your installed.* files to get the installation to redo itself from the start. Try the following:

Change directory to your NRPE install folder (mine is in tmp)

Code: Select all

cd /tmp/linux-nrpe-agent
Remove all installed.* files and attempt a reinstall:

Code: Select all

rm -f installed.*
./fullinstall
Let me know the results of the above, thanks!
Twits Blog
Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
hkang
Posts: 41
Joined: Tue Jan 05, 2016 4:34 pm

Re: NRPE agent not working on Oracle Linux 7

Post by hkang »

The re-install is complete. The log file is attached. Thanks!
You do not have the required permissions to view the files attached to this post.
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

Re: NRPE agent not working on Oracle Linux 7

Post by jolson »

checking for SSL headers... configure: error: Cannot find ssl headers
I found the above in your install.log file - please verify that you have the following packages on your system:

Code: Select all

[root@localhost linux-nrpe-agent]# rpm -qa | grep header
libevent-headers-1.4.13-4.el6.noarch
kernel-headers-2.6.32-504.23.4.el6.x86_64
glibc-headers-2.12-1.166.el6_7.3.x86_64
[root@localhost linux-nrpe-agent]# rpm -qa | grep ssl
openssl-devel-1.0.1e-42.el6_7.2.x86_64
mod_ssl-2.2.15-39.el6.centos.x86_64
openssl-1.0.1e-42.el6_7.2.x86_64
If you don't have a particular package from my list above, try installing it:

Code: Select all

yum install <packagename>
Also, where is your openssl binary stored?

Code: Select all

which openssl
After doing the above, attempt the installation procedure again:

Code: Select all

rm -rf installed.*
./fullinstall
Does the error still appear?
Twits Blog
Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
hkang
Posts: 41
Joined: Tue Jan 05, 2016 4:34 pm

Re: NRPE agent not working on Oracle Linux 7

Post by hkang »

It looks much better this time. I am able to find check_nrpe:

# find / -name check_nrpe
/tmp/nagjos/linux-nrpe-agent/subcomponents/nrpe/nrpe-2.15/src/check_nrpe
/usr/local/nagios/libexec/check_nrpe

# netstat -pant | grep 5666
tcp6 0 0 :::5666 :::* LISTEN 44031/xinetd

But still got error:
# /usr/local/nagios/libexec/check_nrpe -H 127.0.0.1
CHECK_NRPE: Error - Could not complete SSL handshake.
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

Re: NRPE agent not working on Oracle Linux 7

Post by jolson »

Good! It sounds like the binary is working - lets verify that it exists.

Code: Select all

ls -l     ls -l /usr/sbin/nrpe
SSL may not be working - try using check_nrpe without SSL for now:

Code: Select all

 /usr/local/nagios/libexec/check_nrpe -H 127.0.0.1 -n
Is localhost allowed in your xinetd configuration file?

Code: Select all

cat /etc/xinetd.d/nrpe
If 127.0.0.1 is not in your allowed_hosts definition, you will not be able to run the check locally without issues. Check on that please. Thank you!
Twits Blog
Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
hkang
Posts: 41
Joined: Tue Jan 05, 2016 4:34 pm

Re: NRPE agent not working on Oracle Linux 7

Post by hkang »

1. # ls -l /usr/sbin/nrpe
ls: cannot access /usr/sbin/nrpe: No such file or directory

2. # /usr/local/nagios/libexec/check_nrpe -H 127.0.0.1 -n
CHECK_NRPE: Error receiving data from daemon.

3. # cat /etc/xinetd.d/nrpe
# default: on
# description: NRPE (Nagios Remote Plugin Executor)
service nrpe
{
flags = REUSE
socket_type = stream
port = 5666
wait = no
user = nagios
group = nagios
server = /usr/local/nagios/bin/nrpe
server_args = -c /usr/local/nagios/etc/nrpe.cfg --inetd
log_on_failure += USERID
disable = no
only_from = 10.200.160.93 127.0.0.1
}
Locked