From 4bbb026dd9e39444192456c5f248a791a25954b4 Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Wed, 9 Dec 2015 23:21:42 +0100 Subject: [PATCH] munin cleanup cronjob --- modules/munin/files/master-cleanup-cron | 9 +++++++++ modules/munin/manifests/master.pp | 4 ++++ 2 files changed, 13 insertions(+) create mode 100644 modules/munin/files/master-cleanup-cron diff --git a/modules/munin/files/master-cleanup-cron b/modules/munin/files/master-cleanup-cron new file mode 100644 index 000000000..883998a8d --- /dev/null +++ b/modules/munin/files/master-cleanup-cron @@ -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 diff --git a/modules/munin/manifests/master.pp b/modules/munin/manifests/master.pp index 2a01854d1..ca221b8e4 100644 --- a/modules/munin/manifests/master.pp +++ b/modules/munin/manifests/master.pp @@ -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', + } } -- 2.20.1