Skip to content

Instantly share code, notes, and snippets.

@kirbysayshi
Created November 23, 2011 17:14
Show Gist options
  • Save kirbysayshi/1389254 to your computer and use it in GitHub Desktop.
Save kirbysayshi/1389254 to your computer and use it in GitHub Desktop.
quick examples of how to change many many wsp (graphite/whisper) files settings
for f in $(find $1 -iname "*.wsp"); do
if [ -a $f ];
then /opt/graphite/bin/whisper-set-aggregation-method.py $f max;
fi;
done
for f in $(find $1 -iname "*.wsp"); do
if [ -a $f ];
then /opt/graphite/bin/whisper-resize.py $f 10s:12h 60s:7d 10m:3y;
fi;
done
@7yl4r
Copy link

7yl4r commented Jun 29, 2017

@gargnisha1605 : you have increased the number of data points to retain with this operation because of your higher sampling frequency.

60s:1d is one day's (24h) worth of minutes (24h * 60m/h * 60s/m) / 60s = 1440.

10s:6h is six hours of decaseconds (6h * 60m/h * 60s/m) / 10s = 2160

The resize filled in the gaps your new policy created (probably with 0s).

@logicalup
Copy link

@gargnisha1605 and anyone else doing this for storage space, you can check your retention size per metric here: https://m30m.github.io/whisper-calculator/
Don't forget that every counter has 2 metrics (count and rate), and every timer has about 10 or so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment