Whisper data file retention (Grafana / Graphite)
I have been using stack of Grafana + Graphite + Whisper with collectd daemons on my Linux servers for many many years. After some update – I have suddenly noticed, that my whisper database retention configuration is not being taken in account.
For all old servers things were running fine, but on every new server – data metrics were only kept for 7 days.. After looking around (a lot) I failed finding reason for this. Instead I found a solution – you need to resize your whisper database files – basically set – how big they should be for metrics.
My retention for metrics is: 30:7d 1m:30d 5m:90d 1h:2y
(30 second metrics – keep 7 days, aggregated 1minute metrics – 30 days and so on)
To set/resize whisper database files – I have execute the following command
# change to whisper database folder
cd /var/lib/graphite/whisper/collectd
# find all "*.wsp" files and execute whisper-resize on each file with my retention policy
find . -name *.wsp -exec whisper-resize {} 30:7d 1m:30d 5m:90d 1h:2y --nobackup \;
restart grafana/whisper always is a good idea..