Created
January 5, 2016 22:46
-
-
Save rendicott/a8da9fda732bb4c0acf8 to your computer and use it in GitHub Desktop.
Shell script to refactor Graphite whisper files with updated retention data
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd /var/lib/graphite/whisper/teamcity | |
for f in $(find $1 -iname "*.wsp") | |
do | |
if [ -a $f ] | |
then | |
# the retention policy should match what's in your /etc/carbon/storage-schemas.conf | |
/root/source/graphite-project/bin/whisper-resize.py $f 1m:7d 5m:28d 15m:1y | |
fi | |
done | |
chown -R _graphite:_graphite /var/lib/graphite/whisper |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment