probe_ probe_success # 是否探测成功(取值 1、0 分别表示成功、失败) probe_duration_seconds # 探测的耗时 # 关于 DNS probe_dns_lookup_time_seconds # DNS 解析的耗时 probe_ip_protocol # IP 协议,取值为 4、6 probe_ip_addr_hash # IP 地址的哈希值,用于判断 IP 是否变化 # 关于 HTTP probe_http...
probe_success == 1 ##联通性正常 告警也是判断这个指标是否等于0,如等于0 则触发异常报警 image.png 2、通过 http 模块我们可以获取证书的过期时间,可以根据过期时间添加相关告警 probe_ssl_earliest_cert_expiry :可以查询证书到期时间。 image.png 经过单位转换我们可以得到一下,按天来计算:(probe_ssl_earliest...
icmp、tcp、http、post 监测是否正常可以观察probe_success 这一指标 probe_success == 0 ##联通性异常 probe_success == 1 ##联通性正常 告警也是判断这个指标是否等于0,如等于0 则触发异常报警 告警规则可以如下配置: cat >/data/Software/prometheus-2.28.1.linux-amd64/rules/Blackbox-Exporter-http.yml <...
http.HandleFunc(path.Join(*routePrefix, "/probe"), func(w http.ResponseWriter, r *http.Request) { sc.Lock() conf := sc.C sc.Unlock() prober.Ha...
blackbox-exporter 监控https网站失败 在监控https网站时,probe_success一直返回0,看了很多文档,对照配置一直没有发现原因,最终在github issus中找到了答案,竟然是版本问题. 经过测试改用 prom/blackbox-exporter:v0.14.0 解决了问题
probe_success{job="blackbox-http"} == 0 and on(job) time() - max_over_time(probe_success[30m]) > 300for:5mlabels:severity:criticalannotations:runbook:"https://wiki.example.com/blackbox-troubleshooting" 六、避坑指南:生产环境常见问题 ...
expr: probe_success == 0 for: 5m labels: severity: critical service: my_http_service 在上述示例中,我们定义了一个名为"HTTPServiceDown"的告警规则,通过`probe_success == 0`的表达式来判断探测状态是否为失败。当探测状态在5分钟内持续为失败时,该告警将被触发。触发的告警将被标记为"critical"的严重程...
expr: probe_success == 0 for: 1m labels: severity: critical annotations: summary: "blackbox探测失败{{ $labels.instance }}" description: "blackbox检测失败,当前值:{{ $value }}" - alert: 请求慢预警 expr: avg_over_time(probe_duration_seconds[1m]) > 3 ...
要使⽤blackbox_exporter 监控⼀个服务,你只需要告诉它服务的地址和想要检查的类型。blackbox_exporter 将执⾏检查,然后将结果存储在/probe接⼝中。 如果想要使(即target),以及监控检测的⽅法(即module),完成设定后,Prometheus就可以定期的从Blackbox_exporter提供的 /probe 端点抓取指标数据,从⽽对⽬标...
probe_success == 0 ##联通性异常 probe_success == 1 ##联通性正常 告警也是判断这个指标是否等于0,如等于0 则触发异常报警 2、通过 http 模块我们可以获取证书的过期时间,可以根据过期时间添加相关告警 probe_ssl_earliest_cert_expiry :可以查询证书到期时间。