Nagios返回“连接到地址和端口443:连接被拒绝”

时间:2018-08-01 10:40:40

标签: nagios

我已将https网址添加到nagios进行监视。理想情况下,该网址应返回302状态代码。但是响应始终从“ HTTP 302”变为“连接到地址和端口443:连接被拒绝HTTP严重-无法打开TCP套接字”

两个响应的服务状态:

1.
{
    host_name="myURL"
    service_description=HTTP
    modified_attributes=0
    check_command=check_http! --expect=302 --ssl
    check_period=24x7
    notification_period=24x7
    check_interval=5.000000
    retry_interval=1.000000
    event_handler=
    has_been_checked=1
    should_be_scheduled=1
    check_execution_time=0.007
    check_latency=0.000
    check_type=0
    current_state=2
    last_hard_state=0
    last_event_id=6158
    current_event_id=6161
    current_problem_id=3057
    last_problem_id=3054
    current_attempt=3
    max_attempts=4
    state_type=0
    last_state_change=1533119301
    last_hard_state_change=1533117561
    last_time_ok=1533119301
    last_time_warning=0
    last_time_unknown=0
    last_time_critical=1533119421
    plugin_output=connect to address and port 443: Connection refused
    long_plugin_output=HTTP CRITICAL - Unable to open TCP socket
    performance_data=
    last_check=1533119421
    next_check=1533119481
    check_options=0
    current_notification_number=0
    current_notification_id=0
    last_notification=0
    next_notification=0
    no_more_notifications=0
    notifications_enabled=0
    active_checks_enabled=1
    passive_checks_enabled=1
    event_handler_enabled=1
    problem_has_been_acknowledged=0
    acknowledgement_type=0
    flap_detection_enabled=1
    process_performance_data=1
    obsess=1
    last_update=1533119435
    is_flapping=1
    percent_state_change=20.79
    scheduled_downtime_depth=0
    }

2.
{
    host_name="myURL"
    service_description=HTTP
    modified_attributes=0
    check_command=check_http! --expect=302 --ssl
    check_period=24x7
    notification_period=24x7
    check_interval=5.000000
    retry_interval=1.000000
    event_handler=
    has_been_checked=1
    should_be_scheduled=1
    check_execution_time=0.062
    check_latency=0.001
    check_type=0
    current_state=0
    last_hard_state=0
    last_event_id=6161
    current_event_id=6162
    current_problem_id=0
    last_problem_id=3057
    current_attempt=1
    max_attempts=4
    state_type=1
    last_state_change=1533119481
    last_hard_state_change=1533117561
    last_time_ok=1533119301
    last_time_warning=0
    last_time_unknown=0
    last_time_critical=1533119481
    plugin_output=HTTP OK: Status line output matched "302" - HTTP/1.1 302 Moved Temporarily - 763 bytes in 0.059 second response time
    long_plugin_output=
    performance_data=time=0.058644s;;;0.000000 size=763B;;;0
    last_check=1533119481
    next_check=1533119781
    check_options=0
    current_notification_number=0
    current_notification_id=0
    last_notification=0
    next_notification=0
    no_more_notifications=0
    notifications_enabled=0
    active_checks_enabled=1
    passive_checks_enabled=1
    event_handler_enabled=1
    problem_has_been_acknowledged=0
    acknowledgement_type=0
    flap_detection_enabled=1
    process_performance_data=1
    obsess=1
    last_update=1533119615
    is_flapping=1
    percent_state_change=20.26
    scheduled_downtime_depth=0
    }

只有两个网址会发生这种情况。 预先感谢您的帮助。

1 个答案:

答案 0 :(得分:0)

如果端口在远程计算机上未打开或未通过防火墙阻止,您将得到连接被拒绝。 httpd服务未运行。