apache / hertzbeat

Apache HertzBeat(incubating) is a real-time monitoring system with agentless, performance cluster, prometheus-compatible, custom monitoring and status page building capabilities.
https://hertzbeat.apache.org/
Apache License 2.0
5.53k stars 959 forks source link

SSL UN_REACHABLE , the service is abroad, the network delay is too high, resulting in occasional errors in SSL monitoring #1061

Open geekyouth opened 1 year ago

geekyouth commented 1 year ago

Question

如何自定义SSL 监控超时时间?

hertzbeat commented 1 year ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Question

How to customize the SSL monitoring timeout?

tomsun28 commented 1 year ago

hi 可以参考下 Http Api的监控模版定义,给SSL监控新增 timeout参数,然后在新增SSL监控页面的时候设置参数值即可

params:
  - field: timeout
    # name-param field display i18n name
    # name-参数字段显示名称
    name:
      zh-CN: 超时时间(ms)
      en-US: Timeout(ms)
    # type-param field type(most mapping the html input type)
    # type-字段类型,样式(大部分映射input标签type属性)
    type: number
    # required-true or false
    # required-是否是必输项 true-必填 false-可选
    required: false
    # hide param-true or false
    # 是否隐藏字段 true or false
    hide: true
    # field-param field key
    # field-变量字段标识
    http:
      # http host: ipv4 ipv6 domain
      host: ^_^host^_^
      # http port
      port: ^_^port^_^
      # http url
      url: ^_^uri^_^
      # http connect timeout
      timeout: ^_^timeout^_^

对于因网络抖动偶发链接失败的情况,建议在阈值配置那里对这个监控类型的可用性阈值的触发次数设置3次,这样连续3次失败才会真正判定为失败告警。