Prometheus: Check if an HTTP server is up

前端 未结 1 1506

Is it possible to add an HTTP server as a target in Prometheus and to check only if response was 200(OK), Or do I have to expose an endpoint that returns some data in the format

相关标签:
1条回答
  • 2021-01-28 06:38

    Here's what Google has to say about it: https://www.robustperception.io/checking-for-http-200s-with-the-blackbox-exporter (o:

    More seriously, Prometheus' Blackbox Exporter is intended for such tasks (not only HTTP, but also DNS, TCP, ICMP) and you can make lots of extra checks in addition to response status (such as content, headers, SSL, certificates). Here's an example configuration that comes with the Blackbox Exporter, covering many of these: https://github.com/prometheus/blackbox_exporter/blob/master/example.yml

    0 讨论(0)
提交回复
热议问题