summaryrefslogtreecommitdiff
path: root/roles/monitoring/prometheus/server/templates/targets
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2021-09-21 19:34:25 +0200
committerChristian Pointner <equinox@spreadspace.org>2021-09-21 19:42:54 +0200
commita8e8cb2ed3d5e68d89edd8785ed59f0ee45f81bf (patch)
treee6457f4c46782e27c8d359e966e8afe1afca87a8 /roles/monitoring/prometheus/server/templates/targets
parentch-sensors1 add new 1-wire therm sensor and fix regexp (diff)
prometheus: simplify job config
Diffstat (limited to 'roles/monitoring/prometheus/server/templates/targets')
-rw-r--r--roles/monitoring/prometheus/server/templates/targets/generic.yml.j24
-rw-r--r--roles/monitoring/prometheus/server/templates/targets/nut-ups.yml.j2 (renamed from roles/monitoring/prometheus/server/templates/targets/nut.yml.j2)0
2 files changed, 2 insertions, 2 deletions
diff --git a/roles/monitoring/prometheus/server/templates/targets/generic.yml.j2 b/roles/monitoring/prometheus/server/templates/targets/generic.yml.j2
index e83b6bf4..45af10c0 100644
--- a/roles/monitoring/prometheus/server/templates/targets/generic.yml.j2
+++ b/roles/monitoring/prometheus/server/templates/targets/generic.yml.j2
@@ -1,3 +1,3 @@
-- targets: [ "{{ hostvars[target].prometheus_scrape_endpoint }}" ]
+- targets: [ "{{ hostvars[target.instance].prometheus_scrape_endpoint }}" ]
labels:
- instance: "{{ target }}"
+ instance: "{{ target.instance }}"
diff --git a/roles/monitoring/prometheus/server/templates/targets/nut.yml.j2 b/roles/monitoring/prometheus/server/templates/targets/nut-ups.yml.j2
index da3de3d7..da3de3d7 100644
--- a/roles/monitoring/prometheus/server/templates/targets/nut.yml.j2
+++ b/roles/monitoring/prometheus/server/templates/targets/nut-ups.yml.j2