| 本地保留 | Prometheus 默认 --storage.tsdb.retention.time=15d |
|---|---|
| 容量上限 | --storage.tsdb.retention.size 限制磁盘用量 |
| 长期方案 | remote write 到对象存储或长期时序库,配合降采样 |
Prometheus 保留期参数
Prometheus 保留期参数
prometheus --config.file=prometheus.yml \
--storage.tsdb.retention.time=30d \
--storage.tsdb.retention.size=200GB
# 两个条件同时生效,先到先删降采样会丢失尖刺信息:容量分析可用,排障与告警仍应依赖原始分辨率数据。