prometheus - Prometheus 保留时间设置为 1 年,但不会将数据保留超过默认 15 天
问题描述
我最近安装了 Prometheus 并使用 Grafana 进行报告。
在安装过程中设置了 Prometheus,保留时间为 1 年 --storage.tsdb.retention.time=1y \
现在,我们从昨天开始注意到 15 天前的数据不再显示。我的代码有问题吗?1y没有被识别吗?
解决方案
您需要在您的启动文件(fe prometheus.service)中设置命令行选项
--storage.tsdb.retention.size 120GB \
--storage.tsdb.retention.time 1825d
在这个例子中,我设置了 120 GB 作为存储空间和 5 年作为保存数据的时间范围
推荐阅读
- javascript - Firebase 身份验证未将数据存储在本地存储中
- ios - 将.a静态库添加到IOS插件
- javascript - 将 setTimeout 与递归函数一起使用
- ios - 领域将 pod 降级到以前的版本 (Swift)
- html - 悬停时的图像在悬停在另一张图像上后出现,但将两张图像彼此相邻
- python-3.x - 在 Django 管理站点中使 settings.py 中的变量可配置
- assembly - 如何将输入中的数字保存为位而不是字节?
- angular9 - 将数组从 api 调用传递到第二个 api 调用
- ios - Xcode Swift UI 侧边菜单内容未对齐
- asp.net - Kentico - SessionManager.IsUserOnline 有时返回 false