How does the blackbox exporter work with Prometheus?
IntermediateConceptPrometheus Architecture
Answer
Prometheus scrapes the exporter's /probe endpoint, passing the real target as a parameter; the exporter performs the probe and returns probe_success, probe_duration_seconds, probe_ssl_earliest_cert_expiry and so on. Relabeling moves the target into the URL parameter:
- job_name: blackbox-http
metrics_path: /probe
params: { module: [http_2xx] }
static_configs:
- targets: ["https://shop.example.com"]
relabel_configs:
- source_labels: [__address__]
target_label: __param_target
- source_labels: [__param_target]
target_label: instance
- target_label: __address__
replacement: blackbox-exporter:9115
More on Prometheus Architecture
Describe the Prometheus architecture.BeginnerWhat does a basic prometheus.yml look like?BeginnerWhat is the `up` metric?BeginnerWhat are `job` and `instance` labels and where do they come from?BeginnerHow is the Prometheus TSDB organized on disk?AdvancedWhat is the WAL and why does Prometheus restart slowly sometimes?Advanced