]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/munin/templates/default/munin-node.conf.erb
Add a bunch more cookbooks
[chef.git] / cookbooks / munin / templates / default / munin-node.conf.erb
diff --git a/cookbooks/munin/templates/default/munin-node.conf.erb b/cookbooks/munin/templates/default/munin-node.conf.erb
new file mode 100644 (file)
index 0000000..0ff07cb
--- /dev/null
@@ -0,0 +1,44 @@
+# DO NOT EDIT - This file is being maintained by Chef
+
+# Configure logging
+log_level 4
+log_file /var/log/munin/munin-node.log
+pid_file /var/run/munin/munin-node.pid
+
+# Run in the background
+background 1
+setsid 1
+
+# Run as root
+user root
+group root
+
+# Regexps for files to ignore
+ignore_file ~$
+ignore_file DEADJOE$ 
+ignore_file \.bak$
+ignore_file %$
+ignore_file \.dpkg-(tmp|new|old|dist)$
+ignore_file \.rpm(save|new)$
+ignore_file \.pod$
+
+# Set the hostname
+host_name <%= node[:hostname] -%>.openstreetmap.org
+
+# List on port 4949 on all interfaces
+host *
+port 4949
+
+# List the addresses that are allowed to connect
+allow ^127\.0\.0\.1$
+<% @servers.each do |server| -%>
+<% server.interfaces do |interface| -%>
+allow ^<%= Regexp.quote(interface[:address]) %>$
+<% end -%>
+<% if server[:openvpn] -%>
+allow ^<%= Regexp.quote(server[:openvpn][:address]) %>$
+<% end -%>
+<% end -%>
+<% node[:munin][:allow].each do |address| -%>
+allow ^<%= Regexp.quote(address) %>$
+<% end -%>