nagios agent on RHEL7

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
bosecorp
Posts: 929
Joined: Thu Jun 26, 2014 1:00 pm

nagios agent on RHEL7

Post by bosecorp »

i'm using nagios XI v5.2.9

and in process of installing the nagios agent on the rhel7 host

Can someone assist me if this is supported ? I followed the below steps but gave me error.
1. wget https://assets.nagios.com/downloads/nag ... ent.tar.gz
2.       tar xzf linux-nrpe-agent.tar.gz
3.       cd linux-nrpe-agent
4.       ./fullinstall

Nagios Linux Agent Installation Log
===================================
DATE: Tue Jul 26 17:04:07 EDT 2016

DISTRO INFO:
RedHatEnterpriseServer
7.2
x86_64

Repos already configured - exiting.
Prereqs already installed - skipping...
Users/groups already configured - skipping.
/etc/services already updated - skipping.
The service command supports only basic LSB actions (start, stop, restart, try-restart, reload, force-reload, status). For other actions, please try to use systemctl.
FirewallD is not running

This needs to be addressed immediately.
bosecorp
Posts: 929
Joined: Thu Jun 26, 2014 1:00 pm

Re: nagios agent on RHEL7

Post by bosecorp »

Also on nagios i can see the check status as OK: No data received yet.

From the RHEL7 client

[root@reviewboard plugins]# service nrpe status
Redirecting to /bin/systemctl status nrpe.service
● nrpe.service - NRPE
Loaded: loaded (/usr/lib/systemd/system/nrpe.service; enabled; vendor preset: disabled)
Active: active (running) since Tue 2016-07-26 17:16:51 EDT; 7s ago
Process: 16109 ExecStart=/usr/sbin/nrpe -c /etc/nagios/nrpe.cfg -d $NRPE_SSL_OPT (code=exited, status=0/SUCCESS)
Main PID: 16110 (nrpe)
CGroup: /system.slice/nrpe.service
└─16110 /usr/sbin/nrpe -c /etc/nagios/nrpe.cfg -d

Jul 26 17:16:51 reviewboard.bose.com systemd[1]: Starting NRPE...
Jul 26 17:16:51 reviewboard.bose.com nrpe[16109]: Invalid IPv6 address in ACL: localhost
Jul 26 17:16:51 reviewboard.bose.com nrpe[16110]: Starting up daemon
Jul 26 17:16:51 reviewboard.bose.com nrpe[16110]: Server listening on 0.0.0.0 port 5666.
Jul 26 17:16:51 reviewboard.bose.com nrpe[16110]: Server listening on :: port 5666.
Jul 26 17:16:51 reviewboard.bose.com nrpe[16110]: Listening for connections on port 0
Jul 26 17:16:51 reviewboard.bose.com nrpe[16110]: Allowing connections from: 10.100.30.111,10.100.30.113,10.100.30.29,10.100.30.30,10.140.140.2...7.0.0.11
Jul 26 17:16:51 reviewboard.bose.com systemd[1]: Started NRPE.
Hint: Some lines were ellipsized, use -l to show in full.
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: nagios agent on RHEL7

Post by Box293 »

bosecorp wrote:and in process of installing the nagios agent on the rhel7 host
Can someone assist me if this is supported ?
Yes it's supported.
bosecorp wrote:FirewallD is not running
Was this the last line of the installation log?

Were you prompted for the allowed from address?
bosecorp wrote:Process: 16109 ExecStart=/usr/sbin/nrpe -c /etc/nagios/nrpe.cfg -d $NRPE_SSL_OPT (code=exited, status=0/SUCCESS)
These file locations are not the ones used by our installation script, the files should be:

/usr/local/nagios/bin/nrpe
/usr/local/nagios/etc/nrpe.cfg

It's possible that NRPE was already installed via YUM ?
bosecorp wrote:Also on nagios i can see the check status as OK: No data received yet.
Can you show us a screenshot of this.

Can you provide the service definition for this service.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
bosecorp
Posts: 929
Joined: Thu Jun 26, 2014 1:00 pm

Re: nagios agent on RHEL7

Post by bosecorp »

[root@reviewboard ~]# rpm -qa| grep -i nrpe
nrpe-2.15-7.el7.x86_64

The path which you mentioned is not seen, its installed in some other path, as seen below.

[root@reviewboard ~]# ls -l /usr/local/nagios/bin/nrpe
ls: cannot access /usr/local/nagios/bin/nrpe: No such file or directory
[root@reviewboard ~]# ls -l /usr/local/nagios/etc/nrpe.cfg
ls: cannot access /usr/local/nagios/etc/nrpe.cfg: No such file or directory
[root@reviewboard ~]# find / -name nrpe*
/tmp/linux-nrpe-agent/subcomponents/nrpe
/tmp/linux-nrpe-agent/subcomponents/nrpe/nrpe-2.15.tar.gz
/tmp/linux-nrpe-agent/subcomponents/nrpe/.svn/prop-base/nrpe-2.15.tar.gz.svn-base
/tmp/linux-nrpe-agent/subcomponents/nrpe/.svn/text-base/nrpe-2.15.tar.gz.svn-base
/tmp/linux-nrpe-agent/subcomponents/nrpe/mods/cfg/.svn/text-base/nrpe.cfg.svn-base
/tmp/linux-nrpe-agent/subcomponents/nrpe/mods/cfg/nrpe.cfg
/tmp/linux-nrpe-agent/subcomponents/nrpe/mods/cfg/nrpe
/usr/sbin/nrpe
/usr/lib/tmpfiles.d/nrpe.conf
/usr/lib/systemd/system/nrpe.service
/usr/share/augeas/lenses/dist/nrpe.aug
/usr/share/doc/nrpe-2.15
/run/nrpe
/run/nrpe/nrpe.pid
/sys/fs/cgroup/systemd/system.slice/nrpe.service
/etc/systemd/system/multi-user.target.wants/nrpe.service
/etc/nagios/nrpe.cfg
/etc/nrpe.d
/etc/sysconfig/nrpe

[root@reviewboard ~]# rpm -qa| grep -i nagios
nagios-plugins-users-2.0.3-3.el7.x86_64
nagios-plugins-load-2.0.3-3.el7.x86_64
nagios-plugins-procs-2.0.3-3.el7.x86_64
nagios-common-4.0.8-2.el7.x86_64
nagios-plugins-swap-2.0.3-3.el7.x86_64
nagios-plugins-2.0.3-3.el7.x86_64
nagios-plugins-disk-2.0.3-3.el7.x86_64

Kindly provide me the steps to install the nrpe client on rhel7 and let me know if i need uninstall all the above mentioned rpms first.
You do not have the required permissions to view the files attached to this post.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: nagios agent on RHEL7

Post by lmiltchev »

Kindly provide me the steps to install the nrpe client on rhel7 and let me know if i need uninstall all the above mentioned rpms first.
If you want to use our Linux agent installer, you will need to uninstall nagios/nrpe rpms, and stop/kill the nrpe service. Currently, NRPE is running as a standalone daemon on this host...

Our official Linux agent installer fails when the "firewalld" is installed but it is NOT running. This is a bug, and I already filed an internal bug report about it (ID 9126) - "Task Detail: Nagios XI Bug Report: Linux Agent Installer fails if firewalld is installed but the service is not running on RHEL/CentOS 7".

The solution (workaround) is simple - before running the "fullinstall" script, start the "firewalld" service:

Code: Select all

service firewalld start
Keep in mind that NRPE will be running under xinetd, so all of the IP addresses from the "allowed_hosts" line in the nrpe.cfg should be placed in the "/etc/xinetd.d/nrpe" file ("only_from" line), and the "xinetd" should be restarted:

Code: Select all

service xinetd restart
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked