How to install NRPE Nagios Client on Linux

nrpe nagios install linux, install nagios client, how to install nrpe linux, install NRPE Nagios Client on Linux, nagios nrpe configuration on linux

How to install NRPE Nagios Client on Linux

In this article, we describes you how to install NRPE Nagios Client on Linux. In the previous article, we have discussed about the installation of nagios server on Linux in the last article, click here to see how to configure and install the nagios on Linux servers.

This article will show you that, how to install Nagios NRPE client on Linux server.

Our Setup:

Server IP Address : 192.168.2.1
Client IP Address : 192.168.2.2 (Here only we are going to install nagios nrpe client)

1. Install Required Dependencies Packages

Please install all below required dependencies for Nagios through yum server, because installing these packages individually is more complicated. So we recommended to go with Yum server.
yum install -y gcc glibc glibc-common gd gd-devel make net-snmp openssl-devel

2. Download Nagios Client (NRPE) Software and Nagios Plugins


If you wish to download the latest version, please visit https://www.nagios.org/download/

I have downloaded from the below link and kept in my linux client already in the folder /home/learnitguide.

Nagios NRPE : http://sourceforge.net/projects/nagios/files/nrpe-2.x/
Nagios Plugin Link : http://nagios-plugins.org/download/nagios-plugins-2.0.3.tar.gz
[learnitguide@nagios-client ~]# cd /home/learnitguide/
Extract Nagios Core and its Plugins:
[learnitguide@nagios-client ~]# tar -xvf nrpe-2.15.tar.gz
[learnitguide@nagios-client ~]# tar -xvf nagios-plugins-2.0.3.tar.gz

3. Create a dedicated user and group for nagios

[learnitguide@nagios-client ~]# groupadd nagios
[learnitguide@nagios-client ~]# useradd -g nagios -d /home/nagios nagios
Set the password for Nagios user:
[learnitguide@nagios-client ~]# passwd nagios
Changing password for user nagios.
New password:
BAD PASSWORD: it is based on a dictionary word
BAD PASSWORD: is too simple
Retype new password:
passwd: all authentication tokens updated successfully.

4. Install the Nagios Plugin:

Go to the directory of nagios plugin which we extracted recently and start installing it.
[learnitguide@nagios-client ~]# cd nagios-plugins-2.0.3
[learnitguide@nagios-client nagios-plugins-2.0.3]# ./configure
[learnitguide@nagios-client nagios-plugins-2.0.3]# make
[learnitguide@nagios-client nagios-plugins-2.0.3]# make install

5. Change the ownership of the Nagios directories to the Nagios group & Nagios user.

[learnitguide@nagios-client nagios-plugins-2.0.3]# chown -R nagios:nagios /usr/local/nagios

6. Install the NRPE Nagios Client:

Go to the directory of nrpe nagios plugin which we extracted recently and start installing it.
[learnitguide@nagios-client nagios-plugins-2.0.3]# cd /root/nrpe-2.15
[learnitguide@nagios-client nrpe-2.15] ./configure
[learnitguide@nagios-client nrpe-2.15] make all
[learnitguide@nagios-client nrpe-2.15] make install-plugin
[learnitguide@nagios-client nrpe-2.15] make install-daemon
[learnitguide@nagios-client nrpe-2.15] make install-daemon-config
[learnitguide@nagios-client nrpe-2.15] make install-xinetd

7. Edit the /etc/xinetd.d/nrpe file to work through xinetd and add the nagios server IP address to allow requests.


Before Change:

# 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       = 127.0.0.1
}

After change:

# 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       = 127.0.0.1 192.168.2.1
}

8. Edit the /etc/services file and add nrpe to the services at the end of the line.

nrpe 5666/tcp # NRPE

9. Restart the xinetd service and check if the nrpe is being listened.

[learnitguide@nagios-client nrpe-2.15] /etc/init.d/xinetd restart
Stopping xinetd:                                           [  OK  ]
Starting xinetd:                                           [  OK  ]
[learnitguide@nagios-client nrpe-2.15] netstat -at | grep nrpe
tcp        0      0 *:nrpe                      *:*                         LISTEN
[learnitguide@nagios-client nrpe-2.15] /usr/local/nagios/libexec/check_nrpe -H localhost
NRPE v2.15

If you get the NRPE Version as output here, you have done the NRPE installation on Linux successfully.

10. Ensure the connectivity between the Nagios client and the Nagios server:

Login into Nagios server 192.168.2.1 and run the below command, here we should get the nrpe version of the client.

[root@nagios-server ~]# /usr/local/nagios/libexec/check_nrpe -H 192.168.2.2
NRPE v2.15

We are done the installation of NRPE client, we will see the NRPE Configuration on Linux in other upcoming article.

Hope you enjoyed, please share and leave your comments. NRPE nagios Install, nrpe nagios install linux, nrpe linux client, install nagios client, install nrpe centos, install nrpe linux, install NRPE Nagios Client on Linux, nrpe configuration linux, How to install nrpe on linux, How to install nrpe on fedora, How to install nrpe on centos, how to install nrpe client on centos, how to install nrpe on windows, how to install nrpe in centos, how to install nrpe on suse linux, how to install nrpe on debian, how to install nrpe on redhat, how to install nrpe on ubuntu, nagios nrpe firewall How to install NRPE Nagios Client on Linux, How to Add Linux Host to Nagios Monitoring Server, Installing The Linux nrpe agent, nrpe linux memory check, 
July 17, 2015

Post a Comment

[disqus][facebook][blogger]

Contact Form

Name

Email *

Message *

Powered by Blogger.
Javascript DisablePlease Enable Javascript To See All Widget