1、redhat上 安nagios-plugins的时候出现checking for redhat spopen problem...了不动了。。
这是在编译:./configure --prefix=/usr/local/plugins 出现的问题。
解决方法:./configure --prefix=/usr/local/plugins --enable-redhat-pthread-workaround(加个参数)。
2、在监控机上,执行:
#root@localhost libexec]# /usr/local/nagios/libexec/check_nrpe -H 192.168.229.129
CHECK_NRPE: Error - Could not complete SSL handshake.
解决方案:
在被监控机nrpe.cfg中,增加监控主机的地址:
#NOTE: This option is ignored if NRPE is running under either inetd or xinetd
allowed_hosts=127.0.0.1,192.168.229.128
注意两个地址以逗号隔开。并关闭超级守护进程xinetd.
3、在监控机上,运行:
[root@localhost etc]# /usr/local/nagios/libexec/check_nrpe -H 192.168.229.129 -c check_users
NRPE: Unable to read output
解决方案:#/usr/local/nagios/libexec/check_nrpe -H 192.168.229.129
返回结果:nrpe.2.8.1
说明监控机与被监控机的nrpedaemon通信是正常,然后,检查被监控机的nrpe.cfg文件,发现,文件中定义的命令与实际安装的目录不一致造成的。修改一下,正确路径后:
[root@localhost etc]# /usr/local/nagios/libexec/check_nrpe -H 192.168.229.129 -c check_users
USERS OK - 1 users currently logged in |users=1; 5; 10; 0
4、在RHEL 5环境下编译安装nrpe的过程中,出现了一个错误:
#./configure --enable-ssl --enable-command-args
checking for SSL libraries... configure: error: Cannot find ssl libraries
原因是:缺少一个安装包:openssl-devel-0.9.8b-8.3.el5.i386.rpm
下载,或者从源光盘拷出这个文件,另外,把依赖的几个包也同时拷出来。分别是:krb5-devel-1.5-17.i386.rpm,zlib-devel-1.2.3-3.i386.rpm,e2fsprogs-devel-1.39-8.el5.i386.rpm。
安装顺序为:
#rpm -ivh e2fsprogs-devel-1.39-8.el5.i386.rpm
#rpm -ivh krb5-devel-1.5-17.i386.rpm
#rpm -ivh zlib-devel-1.2.3-3.i386.rpm
#rpm -ivh openssl-devel-0.9.8b-8.3.el5.i386.rpm
OK,通过rpm -qa|grep ssl将会发现:
openssl-0.9.8b-8.3.el5
openssl-devel-0.9.8b-8.3.el5
openssl-devel安装成功!