-
-
Save Krinkle/677d04fad6f9b36d3a8bb0dee1b90dc5 to your computer and use it in GitHub Desktop.
This file contains 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
#!/bin/bash -eu | |
for f in $(find . -iname '*.wsp'); do | |
if [ -a "$f" ]; then | |
name="$(basename $f)"; | |
# Vary xFilesFactor | |
# Based on https://github.com/wikimedia/operations-puppet/blob/production/modules/role/manifests/graphite/base.pp | |
case "$name" in | |
count.wsp|sum.wsp) x='0' ;; | |
*) x='0.01' ;; | |
esac | |
# Storage schema is assumed as zzdefault. | |
# Don't apply this script to 'daily' or 'hourly' metrics | |
echo "Resizing $f ..." | |
sudo -u _graphite whisper-resize "--xFilesFactor=$x" "$f" 1m:7d 5m:14d 15m:30d 1h:1y 1d:5y | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment