Skip to content

Commit

Permalink
Update munin-node config template to allow scraping from any host
Browse files Browse the repository at this point in the history
  • Loading branch information
jb3 committed Aug 30, 2024
1 parent 085d1a4 commit d2276e0
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion ansible/roles/munin-node/templates/munin-node.conf.j2
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
# Managed by Ansible

log_level 4

{% if ansible_distribution == 'Debian' %}
log_file /var/log/munin/munin-node.log
pid_file /var/run/munin/munin-node.pid
{% endif %}

background 1
setsid 1
Expand Down Expand Up @@ -42,6 +45,10 @@ host_name {{ ansible_fqdn }}
allow ^127\.0\.0\.1$
allow ^::1$

{% for host in hostvars %}
allow ^{{ hostvars[host]['ansible_wg0']['ipv4']['address'] | regex_replace('\.', '\\.') }}$
{% endfor %}

# If you have installed the Net::CIDR perl module, you can use one or more
# cidr_allow and cidr_deny address/mask patterns. A connecting client must
# match any cidr_allow, and not match any cidr_deny. Note that a netmask
Expand All @@ -55,7 +62,7 @@ allow ^::1$

# Which address to bind to;
# host *
host 127.0.0.1
host {{ ansible_wg0.ipv4.address }}

# And which port
port 4949

0 comments on commit d2276e0

Please sign in to comment.