diff options
-rw-r--r-- | files/config/host/logrotate.Debian | 35 | ||||
-rw-r--r-- | files/config/host/munin.conf.header.Debian | 2 | ||||
-rw-r--r-- | manifests/client/gentoo.pp | 1 | ||||
-rw-r--r-- | manifests/client/openbsd.pp | 1 | ||||
-rw-r--r-- | manifests/client/package.pp | 1 | ||||
-rw-r--r-- | manifests/plugin.pp | 1 | ||||
-rw-r--r-- | manifests/plugins/centos.pp | 3 | ||||
-rw-r--r-- | manifests/plugins/setup.pp | 4 | ||||
-rw-r--r--[l---------] | templates/munin-node.conf.Debian.lenny | 40 | ||||
l--------- | templates/munin-node.conf.Debian.sid | 2 | ||||
l--------- | templates/munin-node.conf.Debian.squeeze | 2 | ||||
-rw-r--r-- | templates/munin-node.conf.Debian.wheezy | 57 | ||||
-rw-r--r-- | templates/site.conf | 9 |
13 files changed, 154 insertions, 4 deletions
diff --git a/files/config/host/logrotate.Debian b/files/config/host/logrotate.Debian new file mode 100644 index 0000000..732c871 --- /dev/null +++ b/files/config/host/logrotate.Debian @@ -0,0 +1,35 @@ +/var/log/munin/munin-update.log { + daily + missingok + rotate 7 + compress + notifempty + create 640 munin adm +} + +/var/log/munin/munin-graph.log { + daily + missingok + rotate 7 + compress + notifempty + create 660 munin www-data +} + +/var/log/munin/munin-html.log { + daily + missingok + rotate 7 + compress + notifempty + create 640 munin adm +} + +/var/log/munin/munin-limits.log { + daily + missingok + rotate 7 + compress + notifempty + create 640 munin adm +} diff --git a/files/config/host/munin.conf.header.Debian b/files/config/host/munin.conf.header.Debian index 082f01f..771d50d 100644 --- a/files/config/host/munin.conf.header.Debian +++ b/files/config/host/munin.conf.header.Debian @@ -4,7 +4,7 @@ # databases, the HTML output, and the logs, severally. They all # must be writable by the user running munin-cron. dbdir /var/lib/munin -htmldir /var/www/munin +htmldir /var/cache/munin/www logdir /var/log/munin rundir /var/run/munin diff --git a/manifests/client/gentoo.pp b/manifests/client/gentoo.pp index 6a01050..e79f6b0 100644 --- a/manifests/client/gentoo.pp +++ b/manifests/client/gentoo.pp @@ -1,4 +1,5 @@ class munin::client::gentoo inherits munin::client::package { + Package['munin-node'] { name => 'munin', category => 'net-analyzer', diff --git a/manifests/client/openbsd.pp b/manifests/client/openbsd.pp index 1852962..cd21abf 100644 --- a/manifests/client/openbsd.pp +++ b/manifests/client/openbsd.pp @@ -1,5 +1,6 @@ # currently we install munin on openbsd by targz # :( + class munin::client::openbsd inherits munin::client::base { if $::operatingsystemrelease == '4.3' { file{'/usr/src/munin_openbsd.tar.gz': diff --git a/manifests/client/package.pp b/manifests/client/package.pp index 58f40da..206ccc8 100644 --- a/manifests/client/package.pp +++ b/manifests/client/package.pp @@ -9,3 +9,4 @@ class munin::client::package inherits munin::client::base { before => Package['munin-node'], } } + diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 36fc81b..ffe5452 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -54,3 +54,4 @@ define munin::plugin ( } } } + diff --git a/manifests/plugins/centos.pp b/manifests/plugins/centos.pp new file mode 100644 index 0000000..60c706c --- /dev/null +++ b/manifests/plugins/centos.pp @@ -0,0 +1,3 @@ +class munin::plugins::centos inherits munin::plugins::base { + munin::plugin { users: ensure => present; } +} diff --git a/manifests/plugins/setup.pp b/manifests/plugins/setup.pp index 5c56099..197b657 100644 --- a/manifests/plugins/setup.pp +++ b/manifests/plugins/setup.pp @@ -1,4 +1,8 @@ class munin::plugins::setup { + + # This is required for the munin-node service and package requirements below. + include munin::client + file { [ '/etc/munin/plugins', '/etc/munin/plugin-conf.d' ]: ignore => 'snmp_*', diff --git a/templates/munin-node.conf.Debian.lenny b/templates/munin-node.conf.Debian.lenny index e0646b9..56da89d 120000..100644 --- a/templates/munin-node.conf.Debian.lenny +++ b/templates/munin-node.conf.Debian.lenny @@ -1 +1,39 @@ -munin-node.conf.Debian.etch
\ No newline at end of file +########## +########## Managed by puppet +########## + +log_level 4 +log_file /var/log/munin/munin-node.log +pid_file /var/run/munin/munin-node.pid +background 1 +setseid 1 + +# Which host/port to bind to; +host <%= munin_host_real %> +port <%= munin_port_real %> +user root +group root +setsid yes + +# Regexps for files to ignore + +ignore_file ~$ +ignore_file \.bak$ +ignore_file %$ +ignore_file \.dpkg-(tmp|new|old|dist)$ +ignore_file \.rpm(save|new)$ + +# Set this if the client doesn't report the correct hostname when +# telnetting to localhost, port 4949 +# +#host_name localhost.localdomain +host_name <%= fqdn %> + +# A list of addresses that are allowed to connect. This must be a +# regular expression, due to brain damage in Net::Server, which +# doesn't understand CIDR-style network notation. You may repeat +# the allow line as many times as you'd like +<% real_munin_allow.split(':').each do |val| -%> +allow <%= '^'+val.gsub(/\./, '\.')+'$' %> +<% end -%> + diff --git a/templates/munin-node.conf.Debian.sid b/templates/munin-node.conf.Debian.sid index e0646b9..6b8d690 120000 --- a/templates/munin-node.conf.Debian.sid +++ b/templates/munin-node.conf.Debian.sid @@ -1 +1 @@ -munin-node.conf.Debian.etch
\ No newline at end of file +munin-node.conf.Debian.lenny
\ No newline at end of file diff --git a/templates/munin-node.conf.Debian.squeeze b/templates/munin-node.conf.Debian.squeeze index e0646b9..6b8d690 120000 --- a/templates/munin-node.conf.Debian.squeeze +++ b/templates/munin-node.conf.Debian.squeeze @@ -1 +1 @@ -munin-node.conf.Debian.etch
\ No newline at end of file +munin-node.conf.Debian.lenny
\ No newline at end of file diff --git a/templates/munin-node.conf.Debian.wheezy b/templates/munin-node.conf.Debian.wheezy new file mode 100644 index 0000000..2b5d41f --- /dev/null +++ b/templates/munin-node.conf.Debian.wheezy @@ -0,0 +1,57 @@ +########## +########## Managed by puppet +########## + +log_level 4 +log_file /var/log/munin/munin-node.log +pid_file /var/run/munin/munin-node.pid + +background 1 +setsid 1 + +user root +group root + +# Regexps for files to ignore + +ignore_file ~$ +#ignore_file [#~]$ # FIX doesn't work. '#' starts a comment +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 localhost.localdomain +host_name <%= 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 + +<% real_munin_allow.split(':').each do |val| -%> +allow <%= '^'+val.gsub(/\./, '\.')+'$' %> +<% 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 <%= munin_host_real %> + +# And which port +port <%= munin_port_real %> + diff --git a/templates/site.conf b/templates/site.conf new file mode 100644 index 0000000..52ddb53 --- /dev/null +++ b/templates/site.conf @@ -0,0 +1,9 @@ +<VirtualHost *> + ServerName <%= name %> + DocumentRoot /var/cache/munin/www/ + <Location /> + order allow,deny + Allow from all + </Location> +</VirtualHost> + |