| 原始层 | 秒级/分钟级精度,保留 7 到 30 天,支撑故障排查 |
|---|---|
| 聚合层 | 按 5 分钟/1 小时/1 天窗口聚合(avg/max/min/count),保留数月到数年 |
| 实现 | InfluxDB v2 用 bucket 保留期 + task 降采样;v1 用 retention policy + continuous query |
示例
示例
原始 bucket:autogen,保留 7 天,精度 10s
→ task 每小时聚合 avg/max
聚合 bucket:downsampled,保留 730 天,精度 1h降采样要保留 avg 之外的最大值与计数:排查容量与尖峰时,平均值会掩盖问题。