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

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • 二小姐这个称呼是我弟给取的,因为二小姐在家排行老二,又小家子气。所以,他觉得二小姐这个称呼极其适合她。 二小姐是我...
    谅解时光阅读 1,367评论 5 10
  • 今天上午闺女读了几篇童话,就和我讨价还价,说下午和晚上就不要让她读了,我这人心太软,看着孩子期盼的眼神,我又屈服了...
    轻描淡写的小情绪晴阅读 162评论 0 0
  • 我为什么才19岁,就不想结婚了?对于这个问题,其实我自己也很诧异,对于原因,我只能说,我大概是被“逼”的。 01 ...
    Sunny_907b阅读 747评论 0 4
  • 1. Many people believe that the way We talk shapes the wa...
    AllisonMH阅读 172评论 0 0