Nagios的錯誤及解決方法:
1、 CHECK_NRPE: Error - Could not complete SSL handshake.
在監控端10.11:
# telnet 10.100.0.18 5666
Connection closed by foreign host.
出現此錯誤,證明監控端不能與被監控端的nrpe聯繫,
10.100.0.18:
# netstat –tnlp |grep 5666
tcp 0 0 10.100.0.18:5666 0.0.0.0:* LISTEN 18384/nrpe
手動重啓nrpe服務:kill 18384
# rm –rf /var/run/nrpe.pid 特別注意要刪除其pid文件
# /usr/local/nagios/bin/nrpe –c /usr/local/nagios/etc/nrpe.cfg –d
重新測試:
# telnet 10.100.0.18 5666
Trying 10.100.0.18...
Connected to 10.100.0.18.
Escape character is '^]'.
此時就可以了。
2、UNKNOWN: iostat not found or is not executable by the nagios user.
Check_cpu.sh 插件出現此錯誤,有兩種情況:
(1) 沒有安裝iostat
# yum install –y sysstat
(2) Nagios 用戶沒有權限,也就是此腳本的屬主屬組不是nagios
# chown nagios.nagios check_cpu.sh