graphitegraphite-carbon

how to delete older carbon data automatically?


Is there any configuration to delete older carbon data automatically after certain period of time?

I tried searching it but could not find anything about it.

Thanks in advance for any suggestion and answer.


Solution

  • Graphite as such doesn't support deletion yet. I would advice decreasing the storage-schema to store data only until the point you need it, so as to really solve this 'problem'.

    Still- you can run a cron at regular intervals to do so. The following would delete any wsp file that hasn't been touched in a day-

    Using GNU find:

    find /opt/graphite/storage/whisper/* -name '*\.wsp' -mtime 1 -delete