Home Linux & Systems Cybersecurity Cloud & DevOps Networks & Infrastructure SIEM & Monitoring DFIR & Threat Intel Development & Other All categories Projects About Tools

NRPE Client and Server Installation

Leer en espanol
NRPE Client and Server Installation

Table of contents

NRPE is a client/server software that allows us to monitor servers, switches, firewalls, etc. NRPE Installation ===

Let's see how to install NRPE on GNU/Linux, Unix and Windows.

NRPE is a client/server software that allows us to monitor servers, switches, firewalls, etc.

Installing NRPE on Nagios Server

We install dependencies.

Bash
root@nagios: # apt-get install xinetd libssl-dev

We download NRPE

Bash
root@nagios: # wget http://sourceforge.net/projects/nagios/files/nrpe-2.x/nrpe-2.13/nrpe-2.13.tar.gz

We decompress.

Bash
root@nagios: # tar xvf nrpe-2.13.tar.gz

We access the directory

Bash
root@nagios: # cd nrpe-2.13/

We compile

Bash
root@nagios: # ./configure

root@nagios: # make all

root@nagios: # make install-plugin

root@nagios: # make install-daemon

root@nagios: # make install-daemon-config

root@nagios: # make install-xinetd

Edit /etc/xinetd.d/nrpe to accept requests only from our Nagios Server:

text
only_from       = 127.0.0.1 192.168.1.10

We will add the port to /etc/services. NRPE in order to identify the connections

text
nrpe 5666/tcp # NRPE

We restart xinetd

Bash
root@nagios: # /etc/init.d/xinetd restart

Functional tests

Bash
root@nagios:# netstat -ant | grep 5666

tcp 0 0 0.0.0.0:5666 0.0.0.0:* LISTEN

root@nagios: # /usr/local/nagios/libexec/check_nrpe -H localhost

NRPE v2.13

Installing NRPE on the client in GNU/Linux and UNIX

Bash
root@nagios: # wget http://sourceforge.net/projects/nagios/files/nrpe-2.x/nrpe-2.13/nrpe-2.13.tar.gz

We decompress.

Bash
root@nagios: # tar xvf nrpe-2.13.tar.gz

We access the directory

Bash
root@nagios: # cd nrpe-2.13/

We compile

Bash
root@nagios: # ./configure –prefix=/opt –with-nagios-user=nagios –with-nagios-group=nagios

root@nagios: # make all

root@nagios: # make install-plugin

We check that it works

Bash
netstat -at | grep nrpe

tcp 0 0 *:nrpe *:* LISTEN

Installing NRPE on the client on Windows

For the Windows client we can use  NSClient++ or nrpe_nt (Among others). In our case I am going to install nrpe_nt

We download nrpe_nt

http://sourceforge.net/projects/nrpent/files/nrpent/

and we unzip it. in my case in C:\nrpe

We access through the CMD

text
cd c:\nrpe\bin

We install…

cmd
c:\nrpe\bin>Nrpe_nt.exe -i

NRPE_NT Service sucessfully installed!
c:\nrpe\bin>

We start the service

cmd
c:\nrpe\bin>net start nrpe_nt

El servicio de Nagios Remote Plugin Executor for NT/W2K está iniciándose.

El servicio de Nagios Remote Plugin Executor for NT/W2K se ha iniciado correctam

ente.

c:\nrpe\bin>

Ready, all that remains is to install the plugins that you can download from here:

http://exchange.nagios.org/directory/Plugins/Uncategorized/Operating-Systems/Windows-NRPE/Basic-NRPE_NT-Plugins/details

Regards, rokitoh

:wq!

Comments