您好,登錄后才能下訂單哦!
1.check_iftraffic監控網卡流量的配置及錯誤解決辦法
服務端:
添加以下內容:
vim /usr/local/nagios/etc/objects/commands.cfg
#check iftraffic
define command{
command_name check_iftraffic
command_line $USER1$/check_iftraffic -H $HOSTADDRESS$ -i $ARG1$ -w $ARG2$ -c $ARG3$ -b $ARG4$ -u $ARG5$
}
vim /usr/local/nagios/etc/objects/62xxx.cfg
define service{
use local-service
host_name 62xxx
service_description 網卡流量
check_command check_nrpe!check_iftraffic!"eth0"!50!100!100!m
notifications_enabled 0
}
監控客戶端:
vim /usr/local/nagios/etc/nrpe.cfg
command[check_iftraffic]=/usr/local/nagios/libexec/check_iftraffic_nrpe.pl -i eth0 -w 50 -c 100 -b 100 -u m
重啟服務后,nagios監控頁面提示UNKNOWN,NRPE: Unable to read output
解決辦法:在監控客戶端執行 /usr/local/nagios/libexec/check_iftraffic_nrpe.pl -i eth0 -w 50 -c 100 -b 100 -u m
然后會在 /tmp 下面 生成一個文件 ls /tmp/ traffic_ifeth0 修改traffic_ifeth0的所屬權限 chown nagios.nagios /tmp/traffic_ifeth0 -R
這樣問題就OK了!
2.nagios錯誤日志里面 tailf /var/log/message提示
Aug 14 12:38:07 tsts-57 nagios: Warning: The check of service '交換空間利用率' on host 'localhost' looks like it was orphaned (results never came back). I'm scheduling an immediate check of the service...
Aug 14 12:38:07 tsts-57 nagios: Warning: The check of service '系統負荷' on host 'localhost' looks like it was orphaned (results never came back). I'm scheduling an immediate check of the service...
Aug 14 12:38:18 tsts-57 nagios: Warning: The check of service 'PING' on host '69nginx' looks like it was orphaned (results never came back). I'm scheduling an immediate check of the service...
。。。。。。等等吧
這個錯誤是因為nagios多進程引起的,你可以ps -ef | grep nagios 發現有多個進程,把他們全部殺掉,然后重啟 /etc/init.d/nagios start ,問題就OK了!
nagios啟用通知提示錯誤:“ 無法打開要更新的命令文件,外部命令文件或目錄權限不對,參考FAQ設置正確的權限”
解決辦法:
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。