From ec5e4ba1207bc06aa30f0bfe1ddfe99e2e42e22e Mon Sep 17 00:00:00 2001 From: Tollef Fog Heen Date: Sun, 27 Jul 2014 22:32:12 +0200 Subject: [PATCH] Add delaycompress to munin-node logrotate file to reduce cron spam --- modules/munin/files/logrotate | 10 ++++++++++ modules/munin/manifests/init.pp | 5 +++++ 2 files changed, 15 insertions(+) create mode 100644 modules/munin/files/logrotate diff --git a/modules/munin/files/logrotate b/modules/munin/files/logrotate new file mode 100644 index 000000000..53cb30f73 --- /dev/null +++ b/modules/munin/files/logrotate @@ -0,0 +1,10 @@ +/var/log/munin/munin-node.log { + daily + missingok + rotate 7 + compress + copytruncate + notifempty + create 640 root root + delaycompress +} diff --git a/modules/munin/manifests/init.pp b/modules/munin/manifests/init.pp index 8730f53f3..c9b9853ed 100644 --- a/modules/munin/manifests/init.pp +++ b/modules/munin/manifests/init.pp @@ -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', -- 2.20.1