want to increase prometheus data retention time from 7days to 30 days

921 views
Skip to first unread message

Mithun Batabyal

unread,
Jul 16, 2021, 12:09:20 AM7/16/21
to Prometheus Users
Hi Team,

we are using Prometheus and grafana combination for monitoring in out toyota project.
we want to increase data retention time from 7days to 30 days.
we have deployed grafana and prometheus using helm chart from github.
how to increase it?
Please guide me.


Thanks and Regards,
Mithun Batabyal

Bjoern Rabenstein

unread,
Jul 20, 2021, 7:06:00 AM7/20/21
to Mithun Batabyal, Prometheus Users
On 15.07.21 21:09, Mithun Batabyal wrote:
>
> we are using Prometheus and grafana combination for monitoring in out
> toyota project.
> we want to increase data retention time from 7days to 30 days.
> we have deployed grafana and prometheus using helm chart from github.
> how to increase it?

The retention time is a command line flag for the Prometheus
binary. You have to set `--storage.tsdb.retention.time=30d` in your
case.

I don't know Helm charts well enough to tell you exactly how to change
command line flags, but it should be straight forward, I assume.

--
Björn Rabenstein
[PGP-ID] 0x851C3DA17D748D03
[email] bjo...@rabenste.in
Message has been deleted
Message has been deleted

The DevOps Engineer

unread,
Jul 20, 2021, 8:18:44 AM7/20/21
to Prometheus Users
Add args to your deployment.yaml or statefulset.yaml
args:
            - --storage.tsdb.retention.time={{ .Values.server.retention }}
            - --storage.tsdb.wal-compression
            - --storage.tsdb.retention.size={{ .Values.server.retentionSize }}
            - --config.file=/etc/config/prometheus.yml
Reply all
Reply to author
Forward
0 new messages