From 057658ba93e2562c596dfa5607836679631be916 Mon Sep 17 00:00:00 2001 From: Ewoud Kohl van Wijngaarden Date: Tue, 2 Jul 2013 22:49:02 +0200 Subject: Unify OS specific munin-conf.conf In essence all munin-node.conf files contained the same template, besides a few values. By moving all to a single template, maintenance burden is reduced. To ensure all values are still present in the templates, tests are added. --- templates/munin-node.conf.erb | 62 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 templates/munin-node.conf.erb (limited to 'templates/munin-node.conf.erb') diff --git a/templates/munin-node.conf.erb b/templates/munin-node.conf.erb new file mode 100644 index 0000000..5e015d2 --- /dev/null +++ b/templates/munin-node.conf.erb @@ -0,0 +1,62 @@ +########## +########## Managed by puppet +########## + +log_level 4 +log_file <%= @log_file %> +pid_file /var/run/munin/munin-node.pid + +background 1 +setsid 1 + +user <%= @user %> +group <%= @group %> + +# This is the timeout for the whole transaction. +# Units are in sec. Default is 15 min +# +# global_timeout 900 + +# This is the timeout for each plugin. +# Units are in sec. Default is 1 min +# +# timeout 60 + +# 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 this if the client doesn't report the correct hostname when +# telnetting to localhost, port 4949 +# +host_name <%= scope.lookupvar('::fqdn') %> + +# A list of addresses that are allowed to connect. This must be a +# regular expression, since Net::Server does not understand CIDR-style +# network notation unless the perl module Net::CIDR is installed. You +# may repeat the allow line as many times as you'd like +<% scope.lookupvar('munin::client::allow').each do |allow| -%> +allow <%= "^#{Regexp.escape(allow)}$" %> +<% end -%> + +# 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 +# *must* be provided, even if it's /32 +# +# Example: +# +# cidr_allow 127.0.0.1/32 +# cidr_allow 192.0.2.0/24 +# cidr_deny 192.0.2.42/32 + +# Which address to bind to; +host <%= scope.lookupvar('munin::client::host') %> + +# And which port +port <%= scope.lookupvar('munin::client::port') %> -- cgit v1.2.3 From fc4d4d204b2eb3e8f1848fc46f6f4cfc7584f84e Mon Sep 17 00:00:00 2001 From: mh Date: Wed, 29 Jan 2014 23:26:56 +0100 Subject: comment a regexp that is not yet supported by all deployed munin versions --- templates/munin-node.conf.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'templates/munin-node.conf.erb') diff --git a/templates/munin-node.conf.erb b/templates/munin-node.conf.erb index 5e015d2..4448002 100644 --- a/templates/munin-node.conf.erb +++ b/templates/munin-node.conf.erb @@ -23,7 +23,7 @@ group <%= @group %> # timeout 60 # Regexps for files to ignore -ignore_file [\#~]$ +#ignore_file [\#~]$ ignore_file DEADJOE$ ignore_file \.bak$ ignore_file %$ -- cgit v1.2.3 From d09774c635ea72932727d6724ee847942ddafb77 Mon Sep 17 00:00:00 2001 From: antonio Date: Wed, 9 Apr 2014 15:45:37 +0200 Subject: Configurable host_name variable --- templates/munin-node.conf.erb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'templates/munin-node.conf.erb') diff --git a/templates/munin-node.conf.erb b/templates/munin-node.conf.erb index 4448002..891203c 100644 --- a/templates/munin-node.conf.erb +++ b/templates/munin-node.conf.erb @@ -34,7 +34,11 @@ ignore_file \.pod$ # Set this if the client doesn't report the correct hostname when # telnetting to localhost, port 4949 # +<% if scope.lookupvar('munin::client::host_name') == '::fqdn' -%> host_name <%= scope.lookupvar('::fqdn') %> +<% else -%> +host_name <%= scope.lookupvar('munin::client::host_name') %> +<% end -%> # A list of addresses that are allowed to connect. This must be a # regular expression, since Net::Server does not understand CIDR-style -- cgit v1.2.3 From 29919e02a8b3f27d9d516be586e92704b806a48e Mon Sep 17 00:00:00 2001 From: antonio Date: Thu, 12 Jun 2014 00:41:18 +0200 Subject: changed host_name default to ::fqdn --- templates/munin-node.conf.erb | 4 ---- 1 file changed, 4 deletions(-) (limited to 'templates/munin-node.conf.erb') diff --git a/templates/munin-node.conf.erb b/templates/munin-node.conf.erb index 891203c..b0c8fc8 100644 --- a/templates/munin-node.conf.erb +++ b/templates/munin-node.conf.erb @@ -34,11 +34,7 @@ ignore_file \.pod$ # Set this if the client doesn't report the correct hostname when # telnetting to localhost, port 4949 # -<% if scope.lookupvar('munin::client::host_name') == '::fqdn' -%> -host_name <%= scope.lookupvar('::fqdn') %> -<% else -%> host_name <%= scope.lookupvar('munin::client::host_name') %> -<% end -%> # A list of addresses that are allowed to connect. This must be a # regular expression, since Net::Server does not understand CIDR-style -- cgit v1.2.3