munin cleanup cronjob
authorPeter Palfrader <peter@palfrader.org>
Wed, 9 Dec 2015 22:21:42 +0000 (23:21 +0100)
committerPeter Palfrader <peter@palfrader.org>
Wed, 9 Dec 2015 22:21:46 +0000 (23:21 +0100)
modules/munin/files/master-cleanup-cron [new file with mode: 0644]
modules/munin/manifests/master.pp

diff --git a/modules/munin/files/master-cleanup-cron b/modules/munin/files/master-cleanup-cron
new file mode 100644 (file)
index 0000000..883998a
--- /dev/null
@@ -0,0 +1,9 @@
+## THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE.
+## USE: git clone git+ssh://$USER@puppet.debian.org/srv/puppet.debian.org/git/dsa-puppet.git
+
+MAILTO=root
+
+@daily munin    find /var/lib/munin  -maxdepth 1 -type f -name 'state-*' -mtime +90 -delete
+@daily munin    find /var/lib/munin/debian.org -maxdepth 1 -type f -mtime +90 -delete
+@daily www-data find /var/lib/munin/cgi-tmp -type f -mtime +10 -delete
+@daily www-data find /var/lib/munin/cgi-tmp -mindepth 2 -type d -empty -delete
index 2a01854..ca221b8 100644 (file)
@@ -22,4 +22,8 @@ class munin::master {
        }
 
        Munin::Master-per-node<<| |>>
+
+       file { '/etc/cron.d/puppet-munin-cleanup':
+               source => 'puppet:///modules/munin/master-cleanup-cron',
+       }
 }