diff --git a/node_exporter/templates/scrape.yml.j2 b/node_exporter/templates/scrape.yml.j2 index 5b53817954ab3af51f11fad45809578b8b603890..cb5b3efb4aa13a631a20bacdfb2d5ddbdf845fba 100644 --- a/node_exporter/templates/scrape.yml.j2 +++ b/node_exporter/templates/scrape.yml.j2 @@ -1,2 +1,4 @@ - targets: - "{{ ansible_fqdn }}:9100" + labels: + job: node diff --git a/prometheus/templates/prometheus.yml.j2 b/prometheus/templates/prometheus.yml.j2 index a45cc14482058ba1d8db4c98979097f897836898..67daddacfa99cd28f48cc2c24f9ece603ed235f3 100644 --- a/prometheus/templates/prometheus.yml.j2 +++ b/prometheus/templates/prometheus.yml.j2 @@ -20,6 +20,7 @@ scrape_configs: - 'localhost:9090' - job_name: dynamic_scrapers + honor_labels: true file_sd_configs: - files: - /etc/prometheus/scrape/*.yml