Files
nexus/wiki/entities/BlackboxExporter.md
2026-04-27 16:26:34 +08:00

1.7 KiB
Raw Blame History

title, type, tags, last_updated
title type tags last_updated
Blackbox Exporter entity
monitoring
prometheus
blackbox
probe
devops
2026-04-26

Blackbox Exporter — Prometheus 黑盒探测 exporter

官方网址: https://prometheus.io/docs/guides/node-exporter/

类型: 开源项目 / Prometheus Exporter

别名:

  • blackbox_exporter
  • prometheus blackbox

Overview

Blackbox Exporter 是 Prometheus 官方提供的黑盒探测 exporter通过 HTTP、HTTPS、DNS、TCP、ICMP 等协议探测目标端点的可用性、响应时间和 TLS 证书状态,支持细粒度的服务层监控。

支持模块:

  • http_2xx — HTTP/HTTPS 可用性探测
  • https_2xx — 仅 HTTPS 探测
  • dns — DNS 解析探测
  • tcp — TCP 端口探测
  • icmp — ICMP ping 探测

采集指标示例:

  • probe_success — 探测是否成功0/1
  • probe_duration_seconds — 探测耗时(秒)
  • probe_ssl_earliest_cert_expiry — TLS 证书到期时间戳
  • probe_http_status_code — HTTP 响应码
  • probe_dns_lookup_duration_seconds — DNS 解析耗时

典型部署:

  • Docker: prom/blackbox-exporter:latest
  • 端口:9115
  • Prometheus 配置需使用 metrics_path: /probeparams: module: [http_2xx]

关键告警规则示例:

  • 站点不可达: probe_success == 0(持续 2 分钟)
  • TLS 证书到期: probe_ssl_earliest_cert_expiry - time() < 86400 * 14(剩余 < 14 天)

Used By