How Can I Clean Up Reporting Disk Space Usage?

Sean Horn -

In a previous knowledge base article,, we talked about how to control the retention of data in the Analytics product.

Chef Reporting has the same issue, but in the 1.3 version, has a built-in way to cleanup, which we detail in this blog post

We can take that one step further with the following cronjob on a Chef Server.

cat<<'EOF' > /etc/cron.weekly/chef-reporting.cron


echo "[$(date)] Deleting Chef Reporting events older than 1 month" >> $log

opscode-reporting-ctl remove-partitions --before $(date '+%Y-%m') &>> $log 

echo >> $log

exit 0

chmod +x /etc/cron.weekly/chef-reporting.cron
Have more questions? Submit a request


Powered by Zendesk