From 54cb739c90f166c73ce58784afb57a5a520c509e Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Tue, 25 Mar 2014 15:52:20 -0300 Subject: Adding apache config for munin --- files/munin/apache.conf | 86 +++++++++++++++++++++++++++++++++++ manifests/subsystem/monitor/master.pp | 11 +++++ 2 files changed, 97 insertions(+) create mode 100644 files/munin/apache.conf diff --git a/files/munin/apache.conf b/files/munin/apache.conf new file mode 100644 index 0000000..553a624 --- /dev/null +++ b/files/munin/apache.conf @@ -0,0 +1,86 @@ +# Enable this for template generation +Alias /munin /var/cache/munin/www + +# Enable this for cgi-based templates +#Alias /munin-cgi/static /var/cache/munin/www/static +#ScriptAlias /munin-cgi /usr/lib/munin/cgi/munin-cgi-html +# +# Order allow,deny +# Allow from localhost 127.0.0.0/8 ::1 +# AuthUserFile /etc/munin/munin-htpasswd +# AuthName "Munin" +# AuthType Basic +# require valid-user +# + + + Order allow,deny + Allow from localhost 127.0.0.0/8 ::1 + Options None + + # This file can be used as a .htaccess file, or a part of your apache + # config file. + # + # For the .htaccess file option to work the munin www directory + # (/var/cache/munin/www) must have "AllowOverride all" or something + # close to that set. + # + + # AuthUserFile /etc/munin/munin-htpasswd + # AuthName "Munin" + # AuthType Basic + # require valid-user + + # This next part requires mod_expires to be enabled. + # + + # Set the default expiration time for files to 5 minutes 10 seconds from + # their creation (modification) time. There are probably new files by + # that time. + # + + + ExpiresActive On + ExpiresDefault M310 + + + + +# Enables fastcgi for munin-cgi-html if present +# +# +# SetHandler fastcgi-script +# +# + +# +# SetHandler None +# + +# Enables fastcgi for munin-cgi-graph if present +ScriptAlias /munin-cgi/munin-cgi-graph /usr/lib/munin/cgi/munin-cgi-graph + + Order allow,deny + Allow from localhost 127.0.0.0/8 ::1 + # AuthUserFile /etc/munin/munin-htpasswd + # AuthName "Munin" + # AuthType Basic + # require valid-user + + SetHandler fastcgi-script + + + +ScriptAlias /munin-cgi/munin-cgi-html /usr/lib/munin/cgi/munin-cgi-html + + Order allow,deny + Allow from localhost 127.0.0.0/8 ::1 + # AuthUserFile /etc/munin/munin-htpasswd + # AuthName "Munin" + # AuthType Basic + # require valid-user + + SetHandler fastcgi-script + + + diff --git a/manifests/subsystem/monitor/master.pp b/manifests/subsystem/monitor/master.pp index e23f02d..1f97a36 100644 --- a/manifests/subsystem/monitor/master.pp +++ b/manifests/subsystem/monitor/master.pp @@ -13,6 +13,17 @@ class nodo::subsystem::monitor::master { default => 'absent', } + # Munin configuration for apache + file { '/etc/apache2/conf.d/munin': + ensure => present, + owner => root, + group => root, + mode => 0644, + source => 'puppet:///modules/nodo/munin/apache.conf', + require => Package["apache"], + notify => Service["apache"], + } + # See http://www.jethrocarr.com/2012/05/26/munin-performance/ file { "munin_graph_performance": ensure => $ensure, -- cgit v1.2.3