Script to clean puppet dashboard


# this script does cleanup on puppet dashboard
# - removes old entries
# - optimizes the database
# - clears the logs



cd ${dash}

# prune the database of entries older than 15 days
`which rake` ${renv} reports:prune upto=15 unit=day

# optimize the database
`which rake` ${renv} db:raw:optimize

# clear the logs
`which rake` ${renv} log:clear

find /var/lib/puppet/reports/ -type f -mtime +45 -atime +45 -print0 | xargs -0 rm

Submitted by davea on Tue, 2013-08-06 15:23.