a55cc262213166e96371fb652d1543090c7ded43
[mirror/dsa-puppet.git] / modules / munin / files / master-cleanup-cron
1 ## THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE.
2 ## USE: git clone git+ssh://$USER@puppet.debian.org/srv/puppet.debian.org/git/dsa-puppet.git
3
4 MAILTO=root
5
6 @daily munin    find /var/lib/munin  -maxdepth 1 -type f -name 'state-*' -mtime +90 -delete
7 @daily munin    find /var/lib/munin/debian.org -maxdepth 1 -type f -mtime +90 -delete
8 @daily www-data find /var/lib/munin/cgi-tmp -type f -mtime +10 -delete ; find /var/lib/munin/cgi-tmp -mindepth 2 -type d -empty -delete
9
10 # kill munin-update jobs older than 2 hours
11 @hourly munin   ps h -eo pid,etimes,user,args | perl -a -e '($pid,$age,$user,@cmd) = @F; $cmd = join(" ", @cmd); next if ($user ne "munin" or $cmd !~ "munin-update" or $age <= 2*3600); kill("TERM", $pid)'