Jump to content

NRPE Installation on Centos 7.x or RHEL 7.x

From TetraWiki
Revision as of 06:54, 9 October 2015 by Biswajit (talk | contribs) (Created page with " '''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 installa...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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

  1. yum -y install wget openssl-devel and press Enter
  2. cd /tmp and press Enter
  3. wget http://assets.nagios.com/downloads/nagiosxi/agents/linux-nrpe-agent.tar.gz and press Enter

Wait for the file to download

  1. tar xzf linux-nrpe-agent.tar.gz and press Enter
  2. cd linux-nrpe-agent and press Enter
  3. ./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.

  1. systemctl start xinetd
  2. systemctl status xinetd

Test NRPE Client / Agent

  1. netstat -antup | grep 5666
  2. 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:

  1. ll /usr/local/nagios/etc/nrpe.cfg

-rw-r--r--. 1 nagios nagios 7227 Oct 9 04:15 /usr/local/nagios/etc/nrpe.cfg

  1. chmod 666 /usr/local/nagios/etc/nrpe.cfg
  2. ll /usr/local/nagios/etc/nrpe.cfg

-rw-rw-rw-. 1 nagios nagios 7227 Oct 9 04:15 /usr/local/nagios/etc/nrpe.cfg

  1. systemctl start xinetd

[root@mail ~]# systemctl restart xinetd