diff --git a/roles/prometheus/templates/prometheus.yml.j2 b/roles/prometheus/templates/prometheus.yml.j2 index 07cb077f7696c1d9db9bd16d9f4ef87dd108fec9..a6d3625cebdafd0605b9f1eeef2e1c0a2e79f796 100644 --- a/roles/prometheus/templates/prometheus.yml.j2 +++ b/roles/prometheus/templates/prometheus.yml.j2 @@ -156,12 +156,12 @@ scrape_configs: - {{ target }} {% endfor %} {% for vhost in blackbox_targets[module] | select('mapping') %} - - labels: - vhost: {{ vhost.hostname }} - targets: - {% for target in vhost.targets %} + - targets: + {% for target in vhost.targets %} - http{{ 's' if vhost.secure }}://{{ target }} - {% endfor %} + {% endfor %} + labels: + vhost: {{ vhost.hostname }} {% endfor %} relabel_configs: - source_labels: [__address__]