我最近安装了Prometheus,并使用Grafana进行报告。
在安装过程中已将Prometheus设置为保留时间为1年--storage.tsdb.retention.time = 1y \
现在,从昨天开始,我们注意到15天之前的数据不再显示。我的代码有问题吗?不能识别1y吗?
答案 0 :(得分:0)
您需要在您的启动文件(例如prometheus.service)中设置命令行选项
--storage.tsdb.retention.size 120GB \
--storage.tsdb.retention.time 1825d
在此示例中,我将120 GB设置为存储空间,将5年设置为保留数据的时间范围