

As you see in the example of the presented job above where the module name, the targets and the address of the exporter are static, so any time when you want to change something you need to change the whole configuration.
#PROMETHEUS BLACKBOX EXPORTER PROFESSIONAL#
Definitely, you can do that, but please remember it isn’t a professional way of achieving it as we talking about Prometheus. What if you have many Blackbox exporters, URLs and multiple modules defined in the exporters’ configurations? The primitive answer is: “define jobs in the Prometheus with all targets (URLs) for each Blackbox exporter” right? Totally it will be almost 20+ jobs and more than 2000 lines of config. relabel_configs: - source_labels: target_label: _param_target - source_labels: target_label: instance - target_label: _address_ replacement: 127.0.0.1:9115 # Blackbox exporter's address. static_configs: - targets: - # Probe with http. According to documentation, a simple Prometheus job configuration looks like this: scrape_configs: - job_name: 'blackbox' metrics_path: /probe params: module: # Look for a HTTP 200 response.

For example, you should monitor 100+ URLs from all locations for ensuring your website availability, latency, etc. Imagine you have 20+ Blackbox exporters in the different locations of The World which don’t belong to any cluster or environment, just they are running as standalone applications for monitoring endpoints from different places. The goal is to achieve a simple, minimal but flexible configuration by avoiding making Prometheus configuration a mess. This story isn’t about the installation of a Blackbox exporter, it’s more about the configuration by Prometheus side. It works out-of-the-box, as it just focuses on external visibility details. This exporter provides metrics about endpoint status, HTTP latencies, redirect information, DNS lookups latencies as well as statistics about SSL certificates expiration. The Prometheus Blackbox exporter allows blackbox probing of endpoints over HTTP, HTTPS, DNS, TCP, ICMP and gRPC. Photo by Alina Grubnyak on Unsplash What is Blackbox exporter?
