dong5300 发表于 2019-1-12 14:42:44

nagios Connection refused by host

服务端(192.168.2.110)无法访问客户端的NRPE:
# /usr/local/nagios/libexec/check_nrpe -H 127.0.0.1
NRPE v2.12
# /usr/local/nagios/libexec/check_nrpe -H 192.168.2.120
Connection refused by host

客户端(192.168.2.120):
# lsof -i :5666
COMMAND   PID   USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
nrpe    18703 nagios    4uIPv485766      0t0TCP localhost:5666 (LISTEN)#只在本地有效,所有外部的IP无法访问
# vim nrpe.conf +44
将以下内容注释掉:
#server_address=127.0.0.1
# pkill nrpe
# /usr/local/nagios/bin/nrpe -c /usr/local/nagios/etc/nrpe.cfg -d
# lsof -i :5666
COMMAND   PID   USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
nrpe    18766 nagios    4uIPv489670      0t0TCP *:5666 (LISTEN)
这个就可以正常访问了

服务端访问:
# /usr/local/nagios/libexec/check_nrpe -H 192.168.2.120 -c check_iostat
IOSTAT OK - user 0.28 nice 0.00 sys 0.30 iowait 0.31 idle 0.00| iowait=0.31%;; idle=0.00%;; user=0.28%;; nice=0.00%;; sys=0.30%;;


  
  




页: [1]
查看完整版本: nagios Connection refused by host