1

I've recently installed Prometheus and am using Grafana for reporting.

I set up Prometheus during installation to have retention time of 1 year using:

--storage.tsdb.retention.time=1y

Now, we noticed from yesterday that data from 15 days prior wasn't showing up anymore. Is there something wrong with my code? Is 1y not being recognised?

Kins
  • 547
  • 1
  • 5
  • 22
Sion
  • 53
  • 3
  • 7

1 Answers1

5

You need to set command line options in ur startup file (f.e. prometheus.service)

--storage.tsdb.retention.size 120GB \                                                                                                                                                                                                     
--storage.tsdb.retention.time 1825d

In this example I set 120 GB as storage space and 5 years as timeframe to keep data

Boris Ivanov
  • 4,145
  • 1
  • 32
  • 40