NRPE Client-Server

NRPE is used as an agent on remote clients of Nagios server.

Also, install this agent on the Nagios Server..

 

NRPE Server:
tar zxvf nrpe-4.#.#.tar.gz


./configure

make all
make install
make install-config
make install-init
(/lib/systemd/system/nrpe.service)

systemctl enable nrpe
# On Nagios server: normal start/stop via nagios start/stop
systemctl start nrpe

 

vi /usr/local/nagios/etc/nrpe.cfg
#log_facility=daemon
log_facility=local7
debug=0
pid_file=/usr/local/nagios/var/nrpe.pid
server_port=5666
nrpe_user=nagios
nrpe_group=nagios
allowed_hosts=127.0.0.1,192.168.178.##
dont_blame_nrpe=0
allow_bash_command_substitution=0
command_timeout=60
connection_timeout=300
ssl_version=TLSv1.2+
ssl_logging=0xff
disable_syslog=0

 


vi /lib/systemd/system/nrpe.service
[Unit]
Description=Nagios Remote Plugin Executor
Documentation=http://www.nagios.org/documentation
After=var-run.mount nss-lookup.target network.target local-fs.target time-sync.target
Before=This email address is being protected from spambots. You need JavaScript enabled to view it. plymouth-quit.service xdm.service
Conflicts=nrpe.socket
[Install]
WantedBy=multi-user.target
[Service]
Type=simple
Restart=on-abort
PIDFile=/usr/local/nagios/var/nrpe.pid
RuntimeDirectory=nrpe
RuntimeDirectoryMode=0755
ExecStart=/usr/local/nagios/bin/nrpe -c /usr/local/nagios/etc/nrpe.cfg -f
ExecReload=/bin/kill -HUP $MAINPID
ExecStopPost=/bin/rm -f /usr/local/nagios/var/nrpe.pid
TimeoutStopSec=60
User=nagios
Group=nagios
PrivateTmp=true
OOMScoreAdjust=-500

  If you like my website, feel free to donate via the Paypal button. Thank you!