NRPE Installation on Centos 7.x or RHEL 7.x
CentOS 7.0 - NRPE The following steps will install the NRPE Client / Agent version 2.15. This uses a custom installer from Nagios Enterprises, it automates the installation and configuration process and it much easier than installing from source.
These steps were performed on a CentOS 7.0 server (minimal install).
Install NRPE Client / Agent
- yum -y install wget openssl-devel and press Enter
- cd /tmp and press Enter
- wget http://assets.nagios.com/downloads/nagiosxi/agents/linux-nrpe-agent.tar.gz and press Enter
Wait for the file to download
- tar xzf linux-nrpe-agent.tar.gz and press Enter
- cd linux-nrpe-agent and press Enter
- ./fullinstall and press Enter
Type y and press Enter Wait for the fullinstall command to complete When prompted, type the IP Address of your Nagios server, for example: Type 192.168.142.129 and press Enter The NPRE Client / agent is now installed and listening on port 5666.
- systemctl start xinetd
- systemctl status xinetd
Test NRPE Client / Agent
- netstat -antup | grep 5666
- telnet 127.0.0.1 5666
This will test that the NRPE Client / Agent is properly installed and listening on port 5666. The following command is executed on a Nagios Core server and the computer running the NPRE Client / Agent has the ip address 192.168.142.132.
Type /usr/local/nagios/libexec/check_nrpe -H 192.168.142.132 and press Enter
You should receive a response like:
NRPE v2.15
This confirms the NRPE Client / Agent is working
Issues
[root@mail ~]# telnet localhost 5666 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. Connection closed by foreign host.
Resolution:
- ll /usr/local/nagios/etc/nrpe.cfg
-rw-r--r--. 1 nagios nagios 7227 Oct 9 04:15 /usr/local/nagios/etc/nrpe.cfg
- chmod 666 /usr/local/nagios/etc/nrpe.cfg
- ll /usr/local/nagios/etc/nrpe.cfg
-rw-rw-rw-. 1 nagios nagios 7227 Oct 9 04:15 /usr/local/nagios/etc/nrpe.cfg
- systemctl start xinetd
[root@mail ~]# systemctl restart xinetd