在伺服器部署好nagios,分别在用戶端安裝好nrpe和nagios-plugins,并在nrpe.cfg裡面修改
server_address=本機IP
allowed_hosts=nagios伺服器IP
但在nagios伺服器端使用nrpe檢查出現
NRPE: Unable to read output
在監控機上運作check_nrpe -H 遠端主機IP
可以檢視到用戶端的nrpe資訊,說明監控機與被監控機的nrpedaemon通信是正常。
根據問題查找得出一些分析的注意地方:
1、檢查用戶端nrpe的權限是否可讀,可被nagios執行。
2、檢查nrpe.cfg裡面commands指令路徑是否正确。
常見的一些nrpe的錯誤資訊解決方法:
在監控機上,執行:
./check_nrpe -H IP
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,IP
注意兩個位址以逗号隔開。并關閉超級守護程序xinetd.
我這裡的問題是出現
我的解決辦法是:修改nagios目錄的權限
#chown -R nagios:nagios nagios/
#chmod -R 775 nagios/
問題解決。
本文轉自 南非波波 51CTO部落格,原文連結:http://blog.51cto.com/nanfeibobo/1675858,如需轉載請自行聯系原作者