Blackbox monitoring is a method of monitoring systems without having to specifically instrument them for monitoring. It is useful for monitoring systems that are difficult or impossible to instrument natively.
The Blackbox Exporter is an official Prometheus exporter designed for blackbox monitoring. It requires a target and a probe type, which could be HTTP, DNS, TCP, gRPC, or ICMP. Once set up, the exporter can be used to monitor any system that responds to those probe types.
Some systems would be very difficult or impossible to instrument natively, when simple blackbox checks can be enough.
For example, the Blackbox exporter is able to hold a TCP discussion to test a SNMP server:
smtp: prober: tcp query_response: - expect: "^220 ([^ ]+) ESMTP (.+)$" - send: "EHLO prometheus\r"
For HTTP, it can also look for specific return code or check the content of the body.
Then, for all the probes, you will get detailed metrics about the success and the duration of the probes, that you can then your for your alerting.
Need help monitoring your services? You can contact us.