Skip to content

Instantly share code, notes, and snippets.

@rendicott
Created January 5, 2016 22:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rendicott/a8da9fda732bb4c0acf8 to your computer and use it in GitHub Desktop.
Save rendicott/a8da9fda732bb4c0acf8 to your computer and use it in GitHub Desktop.
Shell script to refactor Graphite whisper files with updated retention data
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