首页
学习
活动
专区
圈层
工具
发布

Prometheus:探针检测

1、黑盒:blockbox exporter

image.png

blockbox用来探测HTTP HTTPS DNS TCP ICMP

2、配置文件 prober.yml modules: http_2xx: prober: http timeout: 5s http: valid_status_codes: [] method: GET icmp_check: prober: icmp timeout: 5s icmp: preferred_ip_protocol: "ip4" dns_examplecom_check: prober: dns dns: preferred_ip_protocol: "ip4" query_name: "www.example.com" dns_tcp_example: prober: dns dns: transport_protocol: "tcp" # defaults to "udp" preferred_ip_protocol: "ip4" # defaults to "ip6" query_name: "www.prometheus.io"

3、启动 blackbox_exporter --config.file="/etc/prober/prober.yml"

port 9115

4、prometheus配置

image.png

http_probes.json

image.png

关键指标:probe_http_status_code 200 probe_success 1

下一篇
举报
领券