nagios监控http某个url时候提示Connection refused ?
本帖最后由 纯白丶 于 2015-04-08 12:14 编辑首先页面是可以被访问到的:
客户端访问:
root@yyy~$ /usr/lib/nagios/plugins/check_http -I 127.0.0.1 -p 7402 -u /api/v1/heartbeat
HTTP OK: HTTP/1.1 200 OK - 178 bytes in 0.005 second response time |time=0.004876s;;;0.000000 size=178B;;;0服务器访问:root@nagios:/etc/nagios3/services$ /usr/lib/nagios/plugins/check_http -I 192.168.2.21 -p 7402 -u /api/v1/heartbeat
HTTP OK: HTTP/1.1 200 OK - 178 bytes in 0.005 second response time |time=0.005340s;;;0.000000 size=178B;;;0客户端配置:
root@yyy~$ cat /etc/nagios/nrpe.cfg:
command=/usr/lib/nagios/plugins/check_http -I 127.0.0.1 -p 7402 -u /api/v1/heartbeat服务器配置: define service{
use generic-service
host_name web18
service_description CHECK_192.168.2.21 -p 7402 -u /api/v1/heartbeat
check_command check_http!check_cardholder
max_check_attempts 5
normal_check_interval 1
}
服务器上check_http相关的配置:
root@nagios~$ cat /etc/nagios-plugins/config/http.cfg
# 'check_http' command definition
define command{
command_name check_http
command_line /usr/lib/nagios/plugins/check_http -H '$HOSTADDRES$' -I '$HOSTADDRESS$'
}
服务器配置check_command错了,check_nrpe!check_carholder。
楼主应该重复多看几次...而且我估计nagios -v 测试的时候会有提示错误的.. 谢谢!确实是这个原因!不过nagios -v是没提示有错误的,waring和critical都没GB_juno 发表于 2015-04-08 19:03 static/image/common/back.gif
服务器配置check_command错了,check_nrpe!check_carholder。
楼主应该重复多看几次...而且我估计nagios - ...
页:
[1]