storage.local.retention not working as expected

248 views
Skip to first unread message

abhijit...@gmail.com

unread,
Dec 5, 2017, 6:13:06 AM12/5/17
to Prometheus Users
I am trying to retain data in prometheus for a period of one hour.
For this I am starting prometheus as given below
prometheus -config.file=prometheus.yml -storage.local.retention=1h

I would expect that data is retained for one hour and any data prior to one hour should be purged.

But it seem that the old data prior to an hour is not removed.

What am I doing wrong?

Ben Kochie

unread,
Dec 5, 2017, 7:07:06 AM12/5/17
to abhijit...@gmail.com, Prometheus Users
It takes some time for the storage engine to run through a cleanup cycle.  It's also not exact, as it also has to respect the -storage.local.series-file-shrink-ratio flag (default 0.1).

--
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-users+unsubscribe@googlegroups.com.
To post to this group, send email to prometheus-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/5492435b-8fc6-4062-9066-cd6f01dcc174%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

abhijit...@gmail.com

unread,
Dec 5, 2017, 8:33:44 AM12/5/17
to Prometheus Users
Thanks for the reply. 
But can I make any changes to any of these flags (or any other  such that I can enforce the one hour retention.


On Tuesday, December 5, 2017 at 5:37:06 PM UTC+5:30, Ben Kochie wrote:
It takes some time for the storage engine to run through a cleanup cycle.  It's also not exact, as it also has to respect the -storage.local.series-file-shrink-ratio flag (default 0.1).
On Tue, Dec 5, 2017 at 12:13 PM, <abhijit...@gmail.com> wrote:
I am trying to retain data in prometheus for a period of one hour.
For this I am starting prometheus as given below
prometheus -config.file=prometheus.yml -storage.local.retention=1h

I would expect that data is retained for one hour and any data prior to one hour should be purged.

But it seem that the old data prior to an hour is not removed.

What am I doing wrong?

--
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 post to this group, send email to promethe...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages