Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 528
henry.oswald Avatar asked May 07 '15 16:05

henry.oswald


People also ask

How do you add data to graphite?

There are three main methods for sending data to Graphite: Plaintext, Pickle, and AMQP. It's worth noting that data sent to Graphite is actually sent to the Carbon and Carbon-Relay, which then manage the data. The Graphite web interface reads this data back out, either from cache or straight off disk.

What is graphite carbon?

graphite, also called plumbago or black lead, mineral consisting of carbon. Graphite has a layered structure that consists of rings of six carbon atoms arranged in widely spaced horizontal sheets.

What is graphite API?

Graphite-API is an alternative to Graphite-web, without any built-in dashboard. Its role is solely to fetch metrics from a time-series database (whisper, cyanite, etc.) and rendering graphs or JSON data out of these time series. It is meant to be consumed by any of the numerous Graphite dashboard applications.


1 Answers

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 \;
like image 108
dukebody Avatar answered Sep 20 '22 07:09

dukebody