Files
nexus/wiki/concepts/Blackbox_exporter.md
2026-04-17 08:38:12 +08:00

1.2 KiB
Raw Blame History

title, type, tags, sources, last_updated
title type tags sources last_updated
Blackbox_exporter concept
exporter
prometheus
blackbox
monitoring
家庭监控方案-prometheus-grafana-node-exporter-cadvisor-blackbox
2026-04-16

Definition

Blackbox_exporter 是 Prometheus 官方提供的黑盒探测 exporter通过 HTTP、HTTPS、TCP、ICMP、DNS 等协议探测目标可用性和性能。

Supported Modules

  • HTTP/HTTPS探测状态码、响应时间、TLS 证书
  • TCP:端口连通性
  • ICMP主机可达性ping
  • DNS:域名解析

Use Cases

  • 网站可用性监控
  • TLS 证书到期告警
  • DNS 解析监控
  • 内网服务健康检查

Key Metrics

  • probe_success探测是否成功0/1
  • probe_duration_seconds:探测耗时
  • probe_http_status_codeHTTP 状态码
  • probe_ssl_earliest_cert_expirySSL 证书到期时间

Common Alert Rules

  • HTTP 探测失败(连续 3 次)
  • TLS 证书剩余 < 14 天
  • 响应时间 > 阈值

Docker 部署

blackbox:
  image: prom/blackbox-exporter:latest
  ports:
    - "9115:9115"

Default Port

  • 9115

Connections