From 91fc6ce942be1da2026e7b8dcefda5cc86a8fdb3 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Sat, 29 Jun 2024 22:55:29 +0200 Subject: revamp prometheus metric lables for ipmi/remote and nut/ups --- roles/monitoring/prometheus/exporter/register/templates/nut/ups.yml.j2 | 1 + 1 file changed, 1 insertion(+) (limited to 'roles/monitoring/prometheus/exporter/register/templates/nut') diff --git a/roles/monitoring/prometheus/exporter/register/templates/nut/ups.yml.j2 b/roles/monitoring/prometheus/exporter/register/templates/nut/ups.yml.j2 index 5181f4e4..6c549e1e 100644 --- a/roles/monitoring/prometheus/exporter/register/templates/nut/ups.yml.j2 +++ b/roles/monitoring/prometheus/exporter/register/templates/nut/ups.yml.j2 @@ -1,6 +1,7 @@ - targets: [ '{{ (target.exporter_hostname == prometheus_server) | ternary('127.0.0.1:9999', hostvars[target.exporter_hostname].prometheus_scrape_endpoint) }}' ] labels: instance: '{{ target.instance }}' + ups_instance: '{{ target.config.ups }}' __param_ups: '{{ target.config.ups }}' __param_server: '{{ target.config.server | default('127.0.0.1') }}' {% if 'username' in target.config %} -- cgit v1.2.3