Different TSDB retention times

32 views
Skip to first unread message

Adrian Popa

unread,
May 18, 2022, 3:50:59 AM5/18/22
to Prometheus Users
Hello!

I have a prometheus instance that keeps data for 60 days (--storage.tsdb.retention.time=1440h). This is fine for most metrics I keep, but I'd like to keep some metrics (things like temperatures for instance) for longer periods of time (1 year).

Is there a way to do this efficiently? Do I have to set a longer retention period and then force expire most of the data to keep only what I'm interested in? Does this mess with the storage of data (e.g. fragmentation, frequent writes of old data)? Should I keep a different instance for long-term data?

Thank you for any advice.
Regards,
Adrian

Brian Candler

unread,
May 18, 2022, 10:51:12 AM5/18/22
to Prometheus Users
I'd say keep a different instance for long-term data.

This could be another prometheus, which gets data from the first one, e.g. using federation or remote write.  Or it could be some completely different system that it remote writes to.

Ben Kochie

unread,
May 18, 2022, 1:40:35 PM5/18/22
to Brian Candler, Prometheus Users
Yup, with Prometheus to Prometheus remote write, it's much better than federation.

--
You received this message because you are subscribed to the Google Groups "Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/517b6b24-493c-4700-b3e4-5f3e6c72d44bn%40googlegroups.com.

Adrian Popa

unread,
May 19, 2022, 3:23:16 AM5/19/22
to Ben Kochie, Brian Candler, Prometheus Users
Thank you both for the suggestions!

Reply all
Reply to author
Forward
0 new messages