From 8abca7916fc134c8f6bcb4476cde697d8aac7f01 Mon Sep 17 00:00:00 2001 From: Jeltz Date: Sat, 6 Mar 2021 01:57:32 +0100 Subject: [PATCH] Add switch_snmp job for prometheus --- .../templates/prometheus/prometheus.yml.j2 | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/roles/prometheus/templates/prometheus/prometheus.yml.j2 b/roles/prometheus/templates/prometheus/prometheus.yml.j2 index 937f64f..7399f48 100644 --- a/roles/prometheus/templates/prometheus/prometheus.yml.j2 +++ b/roles/prometheus/templates/prometheus/prometheus.yml.j2 @@ -81,6 +81,21 @@ scrape_configs: - target_label: __address__ replacement: 127.0.0.1:9116 + - job_name: switch_snmp + file_sd_configs: + - files: + - "/etc/prometheus/targets_switch_snmp.json" + metrics_path: /snmp + params: + module: [procurve_switch] + relabel_configs: + - source_labels: [__address__] + target_label: __param_target + - source_labels: [__param_target] + target_label: instance + - target_label: __address__ + replacement: 127.0.0.1:9116 + - job_name: docker file_sd_configs: - files: