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 of Prometheus?
Thanks.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With