- job_name: 'blackbox'
metrics_path: /probe
params:
module: [http_2xx]
static_configs:
- targets:
-
https://www.google.com relabel_configs:
- source_labels: [__address__]
target_label: __param_target
- source_labels: [__param_target]
target_label: instance
- target_label: __address__
replacement: localhost:9115
- job_name: 'blackbox-dns-monitor'
scrape_interval: 1s
metrics_path: /probe
#params:
#module: [
mindfree.cl]
relabel_configs:
# Populate domain label with domain portion of __address__
- source_labels: [__address__]
regex: (.*):.*$
replacement: $1
target_label: domain
# Populate instance label with dns server IP portion of __address__
- source_labels: [__address__]
regex: .*:(.*)$
replacement: $1
target_label: instance
# Populate module URL parameter with domain portion of __address__
# This is a parameter passed to the blackbox exporter
- source_labels: [domain]
target_label: __param_module
# Populate target URL parameter with dns server IP
- source_labels: [instance]
target_label: __param_target
# Populate __address__ with the address of the blackbox exporter to hit
- target_label: __address__
replacement: localhost:9115
static_configs:
- targets:
- www.google.com:1.1.1.1 #australia cloudflare