Increasing Prometheus storage retention

后端 未结 3 1222
走了就别回头了
走了就别回头了 2021-02-13 01:47

Hi I have Prometheus server installed on my AWS instance but the data is been removed automatically after 15 days. I need to have data for an year or months, is there anything I

3条回答
  •  既然无缘
    2021-02-13 02:15

    There's the --storage.tsdb.retention.time flag that you can set when you start Prometheus. It defines how long data is kept in the time-series database (TSDB). The default is 15 days.

    So, to increase the retention time to a year, you should be able to set this to something like:

    --storage.tsdb.retention.time=1y
    # or
    --storage.tsdb.retention.time=365d
    

    See the Prometheus documentation.

提交回复
热议问题