1.7 KiB
1.7 KiB
title, type, tags, last_updated
| title | type | tags | last_updated | |||||
|---|---|---|---|---|---|---|---|---|
| Blackbox Exporter | entity |
|
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: /probe和params: module: [http_2xx]
关键告警规则示例:
- 站点不可达:
probe_success == 0(持续 2 分钟) - TLS 证书到期:
probe_ssl_earliest_cert_expiry - time() < 86400 * 14(剩余 < 14 天)