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.
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.
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
Is this for whisperfiles that are no longer being written to? Or is this just for older data in an existing metric?
if the former you can run something like
find <whisperpath> -iname "*.wsp" -mtime +<number of days lower limit>
that will list how many that fit the criteria, if you want to delete them in the same command append -delete
find <whisperpath> -iname "*.wsp" -mtime +<number of days lower limit> -delete