diff --git a/templates/conf/prometheus.yml.j2 b/templates/conf/prometheus.yml.j2 index 04673ac..c30328d 100644 --- a/templates/conf/prometheus.yml.j2 +++ b/templates/conf/prometheus.yml.j2 @@ -41,6 +41,11 @@ scrape_configs: {% for target in prometheus_node_exporter_targets %} - {{ target }}:9100 {% endfor %} + relabel_configs: + - source_labels: [ __address__ ] + target_label: instance + regex: '(.*):9100' + replacement: '${1}' {% endif %} {% if prometheus_mysqld_exporter_targets is defined %}