aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Joe Banks <[email protected]>2024-08-30 18:54:38 +0100
committerGravatar Joe Banks <[email protected]>2024-08-30 18:54:38 +0100
commit085d1a48ffbef6111e08bcd1948887db08365e55 (patch)
tree9609f3cb0a66f36531c66e17fb6f2525044d71cc
parentCreate a new firewalld zone for Wireguard interface on Rocky hosts (diff)
Add scraping config to munin master against all Ansible hosts
-rw-r--r--ansible/roles/munin/templates/munin.conf.j212
1 files changed, 8 insertions, 4 deletions
diff --git a/ansible/roles/munin/templates/munin.conf.j2 b/ansible/roles/munin/templates/munin.conf.j2
index ca51bde..bf97a57 100644
--- a/ansible/roles/munin/templates/munin.conf.j2
+++ b/ansible/roles/munin/templates/munin.conf.j2
@@ -104,10 +104,14 @@ timeout_fetch_all_nodes 240
# The value will be limited with timeout_fetch_all_nodes.
timeout_fetch_one_node 180
-# a simple host tree
-[{{ ansible_fqdn }}]
- address 127.0.0.1
- use_node_name yes
+{% for host in hostvars %}
+[{{ hostvars[host]['ansible_fqdn'] }}]
+ address {{ hostvars[host]['ansible_wg0']['ipv4']['address'] }}
+{% endfor %}
+
+# Aggregated totals
+[box.pydis.wtf;Totals]
+ update no
#
# A more complex example of a host tree