Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- cat clean-carbon-logs.sh
- #!/bin/bash
- # Because graphite has now way to configure the logrotation,
- # we do that with a cronjab and this script.
- CARBON_LOGS=/var/log/graphite/carbon-cache/
- # gzip log files older than 3 days
- #find $CARBON_LOGS -type f -mtime +3 -exec gzip -q "{}" \;
- # removes log files older than 360 days
- find $CARBON_LOGS -type f -ctime +360 -exec rm "{}" \;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement