Increasing Prometheus storage retention

不想你离开。 提交于 2020-01-16 12:03:46

问题


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 need to change in my prometheus configuration? Or do I need any extensions like Thanos, I am new to Prometheus so please be easy on the answers


回答1:


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=12m

See the Prometheus documentation.



来源:https://stackoverflow.com/questions/59298811/increasing-prometheus-storage-retention

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!