From 52363085ed97fad7027f57965c22b674bc2ab083 Mon Sep 17 00:00:00 2001 From: Mike Perrone Date: Wed, 12 Oct 2022 21:22:23 -0700 Subject: [PATCH] add template conditional around the pihole exporter --- templates/prometheus.yml.j2 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/templates/prometheus.yml.j2 b/templates/prometheus.yml.j2 index 51d6290b..c4b8d61c 100644 --- a/templates/prometheus.yml.j2 +++ b/templates/prometheus.yml.j2 @@ -72,10 +72,11 @@ scrape_configs: - job_name: 'node' static_configs: - targets: {{ prometheus_node_exporter_targets | to_yaml }} - + {% if pihole_enable %} - job_name: 'pihole-exporter' static_configs: - targets: ['pihole:9617'] + {% endif %} {% filter indent(width=2,first=True) %} {{ prometheus_extra_scrape_configs }}