From 733e9f555dcb7f9b85c2e549637a3d8ba85d7f29 Mon Sep 17 00:00:00 2001 From: Alexandre Iooss Date: Fri, 31 Dec 2021 20:03:04 +0100 Subject: [PATCH] prometheus: add _snmp suffix to ilo target --- playbooks/prometheus.yml | 2 +- roles/prometheus/templates/prometheus.yml.j2 | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/playbooks/prometheus.yml b/playbooks/prometheus.yml index e8fcf95..0b00862 100755 --- a/playbooks/prometheus.yml +++ b/playbooks/prometheus.yml @@ -17,7 +17,7 @@ {{ groups['fleming_unifi'] | list | sort }} prometheus_ipmi_targets: | {{ groups['fleming_pve'] + groups['fleming_server'] | list | sort }} - prometheus_ilo_targets: | + prometheus_ilo_snmp_targets: | {{ groups['fleming_ilo'] | list | sort }} update_motd: diff --git a/roles/prometheus/templates/prometheus.yml.j2 b/roles/prometheus/templates/prometheus.yml.j2 index 5b967a5..6c1fbda 100644 --- a/roles/prometheus/templates/prometheus.yml.j2 +++ b/roles/prometheus/templates/prometheus.yml.j2 @@ -158,10 +158,10 @@ scrape_configs: replacement: '$1:9290' {% endif %} -{% if prometheus_ilo_targets is defined %} - - job_name: ilo +{% if prometheus_ilo_snmp_targets is defined %} + - job_name: ilo_snmp static_configs: - - targets: {{ prometheus_ilo_targets | to_json }} + - targets: {{ prometheus_ilo_snmp_targets | to_json }} metrics_path: /snmp scrape_timeout: 30s params: