2011年10月4日 星期二

nagios linux nrpe設定

server 裝好的 localhost

CentOS5.5 用 rpmforge 的來源做 yum 安裝,plugins 是放在
/usr/lib64/nagios/plugins/

...首先
/etc/nagios/nrpe.cfg 裡的
server_address=
allow_hosts=
後面跟的 IP 不能用逗點加別的 ip (例如:192.168.2.3,127.0.0.1)
目前先試只定義 server_address 1個 IP
allow_hosts 註解掉

iptables 加上   -p tcp -m tcp --dport 5666 -j ACCEPT



service nrpe restart 之後

/usr/lib64/nagios/plugins/check_nrpe -H {host}
 {host} 用兩 ip 都會是
Connection refused by host
觀察應該是設定檔有問題時... nrpe 會自已停掉 service


最後要做出
*檢查
netstat -l | grep 5666
 有結果出來


*檢查
/usr/lib64/nagios/plugins/check_nrpe -H {host}
 出現NRPE 版本 如下
NRPE v2.12

*檢查
/usr/lib64/nagios/plugins/check_nrpe -H localhost -c check_users
/usr/lib64/nagios/plugins/check_nrpe -H localhost -c check_load
/usr/lib64/nagios/plugins/check_nrpe -H localhost -c check_hda1
/usr/lib64/nagios/plugins/check_nrpe -H localhost -c check_total_procs
/usr/lib64/nagios/plugins/check_nrpe -H localhost -c check_zombie_procs



還可以試改用  xinetd 帶起來…

沒有留言:

張貼留言

BloggerAds