From 80bb1217dd6e373640662fc10d6ec2c67b0dd757 Mon Sep 17 00:00:00 2001 From: Joe Banks Date: Thu, 18 Jul 2024 00:54:12 +0100 Subject: Only template node exporter for Ansible hosts --- ansible/host_vars/lovelace/prometheus.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'ansible') diff --git a/ansible/host_vars/lovelace/prometheus.yml b/ansible/host_vars/lovelace/prometheus.yml index b9e0d58..ddda968 100644 --- a/ansible/host_vars/lovelace/prometheus.yml +++ b/ansible/host_vars/lovelace/prometheus.yml @@ -1,5 +1,4 @@ --- - prometheus_cmdline_options: >- --config.file=/etc/prometheus/prometheus.yml --web.page-title='Python Discord Helper Monitoring And Supervision Service' @@ -44,8 +43,8 @@ prometheus_configuration: | # Scrape node exporters on all hosts static_configs: - targets: - {%- for host in hostvars.values() %} - - {{ host['ansible_wg0']['ipv4']['address'] }}:9100 + {%- for host in groups['netcup'] %} + - {{ hostvars[host]['ansible_wg0']['ipv4']['address'] }}:9100 {%- endfor %} - job_name: postgres -- cgit v1.2.3