Nrpe is based on the correct installation of Nagios-plugins, nagios-plugins installation details, please go to:
[Nagios monitoring Nagios-plugins installation]http://4709096.blog.51cto.com/4699096/1702224
Note: Only nagios-plugins can be installed on the monitored host, and Nagios core does not need to be installed.
1. Dependency packet Detection
#rpm-Q xinetd openssl-devel
#yum Install xinetd Openssl-devel
2. Creating Nagios users and user groups
# useradd-s/sbin/nologin Nagios
3. Compiling the installation
Nrpe depends on nagios-plugins, so it needs to be installed first (view previous installation nagios-plugins)
# TAR-ZXVF Nrpe-2.12.tar.gz
# CD Nrpe-2.12.tar.gz
#./configure \
--prefix=/usr/local/nrpe \
--with-nrpe-user=nagios \
--with-nrpe-group=nagios \
--with-nagios-user=nagios \
--with-nagios-group=nagios \
--enable-command-args \
--enable-ssl
# make All
# Make Install-daemon
# Make Install-daemon-config
#make install-xinetd
3. Service Configuration
3.1NRPE Configuration
#vim/usr/local/nrpe/etc/nrpe.conf
Log_facility=daemon
Pid_file=/var/run/nrpe.pid
server_address=172.16.100.11
server_port=5666
Nrpe_user=nagios
Nrpe_group=nagios
allowed_hosts=172.16.100.1
Command_timeout=60
connection_timeout=300
Debug=0
The allowed_hosts directive is used to define the IP address of the monitoring side allowed by this machine.
The main monitoring host to monitor, the use of the command to be defined here before the main monitoring host can be configured to use such a monitored side to identify the main monitoring port from the monitoring command and parameters.
3.2 Configuring XINETD.D
Edit Script/etc/xinetd.d/nrpe
Increase the IP address of the monitoring host after Only_from
3.3 Configuring service Services
Edit/etc/services file to add Nrpe service
Last add a line Nrpe 5666/tcp # Nrpe
4. Start the service
# Service XINETD Restart
Or
#/usr/local/nrpe/bin/nrpe-c/usr/local/nrep/etc/nrpe.cfg–d
5. Verification Services
5.1 See if Nrpe has been started
#netstat-an|grep 5666
5.2 The Check_nrpe plug-in installed on the monitored machine tests whether the Nrpe is working properly.
#/usr/local/nagios/libexec/check_nrpe-h localhost
Normal returns the current version of Nrpe
Acknowledgement: I refer to a number of articles after summing up, in this thank you network share!
This article is from the "4699096" blog, please be sure to keep this source http://4709096.blog.51cto.com/4699096/1702284
Nrpe installation of nagios monitoring (monitored host)