Prometheus:探针检测

1、黑盒:blockbox exporter


Prometheus:探针检测_第1张图片
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配置


Prometheus:探针检测_第2张图片
image.png

http_probes.json

Prometheus:探针检测_第3张图片
image.png

关键指标:probe_http_status_code 200 probe_success 1

你可能感兴趣的:(Prometheus:探针检测)