安装nrpe依赖包
sudo apt-get install gcc glibc glibc-common openssl libssl-dev xinetd
如果nrpe-2.15# ./configure 还是一样的错误!
那么,执行:
dpkg -L libssl-dev
/.
/usr
/usr/lib
/usr/lib/x86_64-linux-gnu
…………………………
/nrpe-2.15# ./configure --with-ssl-lib=/usr/lib/x86_64-linux-gnu
就可以解决问题!!
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的版本号
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。