Add delaycompress to munin-node logrotate file to reduce cron spam
authorTollef Fog Heen <tfheen@err.no>
Sun, 27 Jul 2014 20:32:12 +0000 (22:32 +0200)
committerTollef Fog Heen <tfheen@err.no>
Sun, 27 Jul 2014 20:32:17 +0000 (22:32 +0200)
modules/munin/files/logrotate [new file with mode: 0644]
modules/munin/manifests/init.pp

diff --git a/modules/munin/files/logrotate b/modules/munin/files/logrotate
new file mode 100644 (file)
index 0000000..53cb30f
--- /dev/null
@@ -0,0 +1,10 @@
+/var/log/munin/munin-node.log {
+       daily
+       missingok
+       rotate 7
+       compress
+       copytruncate
+       notifempty
+       create 640 root root
+       delaycompress
+}
index 8730f53..c9b9853 100644 (file)
@@ -40,6 +40,11 @@ class munin {
                notify  => Service['munin-node'],
        }
 
+       file { '/etc/logrotate.d/munin-node':
+               source => 'puppet:///modules/munin/logrotate',
+               require => Package['munin-node'],
+       }
+
        file { [ '/etc/munin/plugins/df', '/etc/munin/plugins/df_abs', '/etc/munin/plugins/df_inode' ]:
                source => 'puppet:///modules/munin/df-wrap',
                mode    => '0555',