标签:lnagios nrpe
安装nrpe依赖包
yum -y install gcc glibc glibc-common openssl openssl-devel
2.安装nagios-plugin
useradd nagios
wget http://sourceforge.net/projects/nagiosplug/files/nagiosplug/1.4.15/nagios-plugins-1.4.15.tar.gz/download
tar zxf nagios-plugins-1.4.15.tar.gz && cd nagios-plugins-1.4.15
./configure --with-nagios-user=nagios --with-nagios-group=nagios
make
make install
chown -R nagios.nagios /usr/local/nagios
3.安装nrpe
wget http://nchc.dl.sourceforge.net/project/nagios/nrpe-2.x/nrpe-2.12/nrpe-2.12.tar.gz
tar zxf nrpe-2.12.tar.gz && cd nrpe-2.12
./configure
make all
make install-plugin
make install-daemon
make install-daemon-config
make install-xinetd
more /etc/xinetd.d/nrpe
only_from ++++ ip
4.启动nrpe并设置开机自启动
/usr/local/nagios/bin/nrpe -c /usr/local/nagios/etc/nrpe.cfg -d
echo "/usr/local/nagios/bin/nrpe -c /usr/local/nagios/etc/nrpe.cfg -d" >> /etc/rc.d/rc.local
5.测试
在nagios服务端检测nrpe和服务端的连接状态
/usr/local/nagios/libexec/check_nrpe -H 192.168.10.101
运行正常的话将返回nrpe的版本号
标签:lnagios nrpe
原文地址:http://wuchaung.blog.51cto.com/2904816/1539640