1、黑盒:blockbox exporter
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配置