Tags

,


 Resizing graphite’s backend database “Whisper”

As part of my re-engineering of our internal servers to be deployable from SaltStack, I needed to create scripts to rebuild our graphite/carbon/whisper metrics gathering systems. During the course of replaying the install/build scripts I discovered that the Whisper Database is a fixed size based on the retention policy initially configured, which in my case was only a few hours of data and so attempting to display the graphite chart beyond the retention time resulted in blank graphs!

So here is a quick examples of how to resize the graphite/whisper database files (they have an extension of “wsp’):


cd /opt/graphite/storage
for f in $(find $1 -iname "*.wsp")
do
    if [ -a $f ]
    then
       /opt/graphite/bin/whisper-resize.py $f 1min:7d 10m:31d
    fi
done
or this one line should also work if you are already in the storage directory (mine is /opt/graphite/storage/whisper):
find ./ -type f -name '*.wsp' -exec whisper-resize.py --nobackup {} 1s:2d 10s:31d 60s:365d \;

If you don’t have the whisper-resize.py file in /opt/graphite/bin, you can download it from the Github project. I downloaded mine from here:

wget https://raw.githubusercontent.com/graphite-project/whisper/master/bin/whisper-resize.py

Keywords and Phrases

  • Graphite Database Resize
  • Whisper Database

 

-oOo-

Advertisements