carbon/graphite 对旧数据应用新保留

carbon/graphite apply new retention to old data

设置石墨时,我不小心将保留设置为 1800 天,而不是 180 天。

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

据我了解,现在更改保留不会清除旧数据。我不确定如何在不破坏我们拥有的所有数据并重新启动的情况下执行此操作。

您必须使用 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 \;