Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Prometheus: Check if an HTTP server is up

Tags:

prometheus

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.

like image 641
yaseco Avatar asked Oct 19 '25 22:10

yaseco


1 Answers

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

like image 175
Alin Sînpălean Avatar answered Oct 23 '25 13:10

Alin Sînpălean



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!