From aeb3a218d18a34caa403aed2071136ad41577088 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Desvaux?= Date: Mon, 20 Mar 2023 14:56:03 +0100 Subject: [PATCH] set port cadvisor in variables --- templates/conf/prometheus.yml.j2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/conf/prometheus.yml.j2 b/templates/conf/prometheus.yml.j2 index 524489d..4969604 100644 --- a/templates/conf/prometheus.yml.j2 +++ b/templates/conf/prometheus.yml.j2 @@ -363,12 +363,12 @@ scrape_configs: static_configs: - targets: {% for target,port in prometheus_cadvisor_exporter_targets %} - - {{ target }}:{{ port }} + - {{ target }} {% endfor %} relabel_configs: - source_labels: [ __address__ ] target_label: instance - regex: '(.*):{{ port }}' + regex: '(.*):8080' replacement: '${1}' {% endif %}