graphitewhisper

carbon/graphite apply new retention to old data


When setting up graphite I accidentally set the retention to 1800 days not 180 days.

'10s:6h,10min:1800d'

From what I understand changing the retention now won't clean up the old data. I am unsure of how todo this without destroying all the data we have and starting agin.


Solution

  • You have to user the whisper-resize.py command. Note that every metric is saved in a .wsp file, so if you want to change the retention policy of all metrics you will have to use a command along the lines of this gist:

    find ./ -type f -name '*.wsp' -exec whisper-resize.py --nobackup {} 10s:6h 10min:180d \;