Installing and Enabling NRPE on Remote FreeBSD Server

April 4, 2013 Jordansphere FreeBSD

Here are some instructions I had (from a couple of years ago may I add) to assist in setting up NRPE for remote monitoring from (eg) Nagios

 

1) Add nagios user. nologin

2) install nagios-plugins from ports (nagios-plugins-1.4.11,1 )

 -> cd / /usr/ports/net-mgmt/nagios-plugins/

-> make

-> make install

 

3) Set permissions

-> chown –R nagios:nagios /usr/local/nagios

-> chown -R nagios:nagios /usr/local/libexec/nagios/

 

4) Download/Unpack

-> cd /home/nagios/

-> mkdir downloads

-> cd downloads

-> wget http://osdn.dl.sourceforge.net/sourceforge/nagios/nrpe-2.8.tar.gz 

 

tar xzf nrpe-2.8.tar.gz

cd nrpe-2.8

Compile the NRPE addon.

./configure

make all

 

Install the NRPE plugin (for testing), daemon, and sample daemon config file.

make install-plugin

make install-daemon

make install-daemon-config

 

5) Add following line to inetd.conf

nrpe    stream  tcp     nowait  nagios  /usr/local/nagios/bin/nrpe /usr/local/nagios/bin/nrpe -c /usr/local/nagios/etc/nrpe.cfg –inetd

 

6) Add the following entry for the NRPE daemon to the /etc/services file.

nrpe     5666/tcp  # NRPE

 

7) Configure /usr/local/nagios/etc/nrpe.cfg

 

-> killall -HUP inetd

 

Check NRPE is running:

-> /usr/local/nagios/libexec/check_nrpe -H localhost

 

8) Add rule in /etc/hosts.allow

(eg)

nrpe : xxx.xxx.xxx.xxx/255.255.255.0 : allow

nrpe remote host enable install freebsd linux,

Powered by WordPress. Designed by elogi.