Compliance says payment metrics must be kept 2 years, but everything else only 90 days. How do you set it up?
BeginnerScenarioLong-Term Storage, Scale and Cost
Answer
Situation read → You need different retention for different data.
What I'd do →
- Put payment services in their own tenant (Mimir) and set retention per tenant:
overrides: payments: compactor_blocks_retention_period: 2y - Or send only the required metrics to a separate bucket using a second
remote_writewithwrite_relabel_configs. - Document which metrics are covered and why.
- Test that old data is actually deleted for other tenants.
Why → Per-tenant retention avoids storing everything for 2 years.
Interview tip → Ask compliance which metrics are really needed; it is usually a small set.
More on Long-Term Storage, Scale and Cost
Prometheus keeps 15 days of data, but leadership wants 13 months of metrics for capacity planning. What do you build?IntermediateThe 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?Intermediate