Retention - how to do it?

We would like to save some space without loosing all data. Therefore it would be great to “compress” old data; we only need a rough overview about the performance of last year, e. g.
With graphite/carbon this was an easy configuration setting, but how to do it with InfluxDB?


afaik this was asked a while ago with deleting stale data.

We also had a discussion on Twitter about that, @KevinHonka & @Mikesch might remember it or post additional thoughts.

The InfluxDB documentation is rather sparse about that. I suppose you did read this already?

Kind regards,

For the downsampling stuff, you would have to ask @Mikesch, but as he will most likely not being available the next few weeks.
I will try to answer your question.

To “compress” data you will need a Continuous Query as described in the documentation.
Which way would fit your need is hard to say maybe you could elaborate a bit more, what kind of performance data(disk,cpu,memory…) we are talking about and how they should be used after being compressed(accuracy…)

Thanks to the Twitter search, I’m not able to find our convo.


i was in vacation and now iam starting my trip to next vacation :slight_smile: But it is as simple as in the docs. Create a RP and a CQ. The retention policy will delete the data older than the RP and the CQ will “compress” them. for the CQ is important which timeframe you want to compress into 1 timeframe, this you can do with "GROUP BY time(30m)"
If you have problems to create the RP and the CQ you have to wait until iam back (around end of january)


1 Like

Might be interested in this, too. It would be great to pin it here as a wiki howto, it’s a question that will be ask more often in the future I think. But end of January is far enough :smiley: Enjoy your holidays!


See Retention policies and continuous queries made simple :slight_smile:

1 Like