Prometheus keeps 15 days of data, but leadership wants 13 months of metrics for capacity planning. What do you build?
IntermediateScenarioLong-Term Storage, Scale and Cost
Answer
Situation read → Local Prometheus retention is the wrong tool for a year of data: big disks, slow restarts, no HA for history.
What I'd do →
- Keep Prometheus local retention short (2–15 days) for fast queries and alerting.
- Add object-storage-backed long-term storage: Thanos sidecar uploading blocks, or
remote_writeto Mimir / a managed service. - Enable downsampling (Thanos) and set retention per resolution:
thanos compact --retention.resolution-raw=30d --retention.resolution-5m=120d --retention.resolution-1h=400d --wait - Create recording rules for the capacity metrics (CPU, memory, requests per service) so year-long queries hit a few pre-aggregated series.
- Point Grafana's capacity dashboards at the Query Frontend.
Why → Object storage is cheap and durable; aggregates keep long-range queries fast.
Interview tip → Say clearly that only a small set of aggregated metrics needs 13 months, not every raw series.
More on Long-Term Storage, Scale and Cost
The Thanos compactor has halted and the bucket keeps growing. What do you do?AdvancedGrafana shows every series twice after you added a second Prometheus replica with Thanos. How do you fix it?IntermediateRemote write to your central store is falling further behind every hour. How do you handle it?AdvancedMimir rejects writes from a team with `err-mimir-max-series-per-user`. What do you do?IntermediateYour observability SaaS bill tripled in a quarter, driven by custom metrics. How do you bring it down?IntermediateYou must choose between Thanos and Mimir for a new long-term metrics platform. How do you decide?Advanced