max local storage size

665 views
Skip to first unread message

Александр Петров

unread,
Mar 15, 2016, 10:08:10 AM3/15/16
to Prometheus Developers
Hello, i'm new in prometheus .

Is there option to set maximum size of local storage after that it will be cleared and reused.
(some kind of rotation)

I have limited disk space and can give 5-10Gb for prometheus, but don't want to monitor size manually and call rm -f ./data after size expired

Thanks



Matthias Rampke

unread,
Mar 15, 2016, 10:14:17 AM3/15/16
to Александр Петров, Prometheus Developers
You can use the -storage.local.retention flag to set *how long* data
is kept around. Data points older than that will eventually be removed
(this is fuzzy).

This is not a limit "by size", and how retention time translates to
time depends on the number and shape of your time series. As soon as
you know after how many days you run out of space, set the retention
to a little less and it should hover around an acceptable size.

The additional benefit for you is that you don't need to start empty
every time – you will have a rolling window of data.

/MR
> --
> You received this message because you are subscribed to the Google Groups
> "Prometheus Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to prometheus-devel...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--
Matthias Rampke
Engineer

SoundCloud Ltd. | Rheinsberger Str. 76/77, 10115 Berlin, Germany | +49
173 6395215

Managing Director: Alexander Ljung | Incorporated in England & Wales
with Company No. 6343600 | Local Branch Office | AG Charlottenburg |
HRB 110657B

Björn Rabenstein

unread,
Mar 15, 2016, 11:24:20 AM3/15/16
to Matthias Rampke, Александр Петров, Prometheus Developers
See also https://github.com/prometheus/prometheus/issues/968 , which
will enable automatic deletion of old samples once the disk gets close
to its capacity.

For now, you have to do what Matthias described: Set a reasonably
retention time, and tune it down or up depending on the disk usage you
see in practice.

--
Björn Rabenstein, Engineer
http://soundcloud.com/brabenstein

SoundCloud Ltd. | Rheinsberger Str. 76/77, 10115 Berlin, Germany
Reply all
Reply to author
Forward
0 new messages