From 6921abf0cbd8951ac6390626a8f61182b2cea83d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20M=E4kinen?= Date: Thu, 22 Nov 2012 12:30:52 +0200 Subject: [PATCH] Added logrotate rules for munin cgi logs. --- munin/manifests/init.pp | 7 +++++++ munin/templates/munin-cgi.logrotate.erb | 17 +++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 munin/templates/munin-cgi.logrotate.erb diff --git a/munin/manifests/init.pp b/munin/manifests/init.pp index 1772eb8..5c13aff 100644 --- a/munin/manifests/init.pp +++ b/munin/manifests/init.pp @@ -269,6 +269,13 @@ class munin::server { group => $apache::sslserver::group, require => Package["munin"], } + file { "/etc/logrotate.d/munin-cgi": + ensure => present, + content => template("munin/munin-cgi.logrotate.erb"), + mode => "0644", + owner => "root", + group => "root", + } file { "/var/www/html/munin/.htaccess": ensure => present, diff --git a/munin/templates/munin-cgi.logrotate.erb b/munin/templates/munin-cgi.logrotate.erb new file mode 100644 index 0000000..63df851 --- /dev/null +++ b/munin/templates/munin-cgi.logrotate.erb @@ -0,0 +1,17 @@ +/var/log/munin/munin-cgi-graph.log { + daily + missingok + rotate 7 + compress + notifempty + create 0664 munin <%= scope.lookupvar('apache::sslserver::group') %> +} + +/var/log/munin/munin-cgi-html.log { + daily + missingok + rotate 7 + compress + notifempty + create 0664 munin <%= scope.lookupvar('apache::sslserver::group') %> +}