Blackbox exporter: Difference between revisions
From wikinotes
(→Notes) |
|||
Line 33: | Line 33: | ||
|- | |- | ||
| [[blackbox_exporter configuration]] | | [[blackbox_exporter configuration]] | ||
|- | |||
| [[blackbox_exporter usage]] | |||
|- | |- | ||
| [[blackbox_exporter debugging]] | | [[blackbox_exporter debugging]] |
Revision as of 14:25, 20 February 2022
Prometheus exporter that probes endpoints over HTTP/HTTPS/DNS/TCP/ICMP.
Documentation
Locations
9115
default port http://localhost:9115
simple web-ui, with sample probe to prometheus.io ${PREFIX}/etc/blackbox_exporter.yml
config
Notes
blackbox_exporter install blackbox_exporter configuration blackbox_exporter usage blackbox_exporter debugging
Testing
/usr/bin/env /usr/local/bin/blackbox_exporter \ --web.listen-address=127.0.0.1:9115 \ --config.file=/usr/local/etc/blackbox_exporter.yml
Usage
Metrics
probe_success
: the probe passed (no search results if no passes!)up
: the metric was reachablepromhttp_metric_handler_requests_total
up{instance="https://willpittman.net"} absent_over_time(promhttp_metric_handler_requests_total{instance="https://willpittman.net", code="200"}[1s])
Debugging
The best method of testing seems to be from a web-browser (not w3m). You can simulate a configured probe using HTTP params against blackbox's url.
- open: http://${IP}:9115/probe?target=https://willpittman.net&module=http_2xx&debug=true - click: 'Logs' in a failed recent probe - see: request logs are at the top - see: at the very bottom, you're looking for 'probe_success 1'