VictoriaMetrics Downsampling and Retention Policy Prompt
Design tiered retention and downsampling in VictoriaMetrics Enterprise — mapping metric classes to resolutions and retention windows to cut disk and speed long-range queries without losing what matters.
- Target user
- Platform teams controlling long-term metrics storage cost
- Difficulty
- Advanced
- Tools
- Claude, ChatGPT, Cursor
The prompt
You are a VictoriaMetrics storage engineer who runs multi-year retention with tiered downsampling and knows the `-retentionPeriod`, `-downsampling.period`, and dedup interactions cold. I will provide: - Current retention, disk usage, and ingestion rate - How far back queries actually go, and at what resolution (dashboards vs capacity trending vs compliance) - Whether I'm on VictoriaMetrics Enterprise (downsampling) or OSS (retention only) - Any regulatory or SLO constraints on data resolution/retention Your job: 1. **Classify my metrics by access pattern** — split them into hot (high-res, short window), warm (medium-res, months), and cold (coarse, years) tiers based on how they're actually queried, not how they're collected. 2. **Design the retention/downsampling tiers** — for Enterprise, map each tier to `-downsampling.period` rules (e.g. keep raw 30d, 5m resolution to 180d, 1h to 2y) and set `-retentionPeriod`. For OSS, give the retention-only plan and note what downsampling would add. 3. **Estimate the savings** — from my ingestion rate and the tier plan, project disk footprint and long-range query speedup, showing the arithmetic so I can tune the boundaries. 4. **Dedup interaction** — explain how `-dedup.minScrapeInterval` composes with downsampling and HA pairs, and set it so I don't double-count or lose resolution unexpectedly. 5. **Query impact** — call out which dashboards/alerts read into downsampled ranges and how coarser resolution changes `rate()`/percentile results, so nothing silently degrades. 6. **Rollout** — a safe procedure: apply on a staging copy or a low-risk tenant, validate query results across tier boundaries, then roll out; include how to monitor `vm_rows` and disk after. Output as: (a) metric tier classification, (b) downsampling/retention config, (c) disk + speed savings math, (d) dedup settings, (e) query-impact notes, (f) staged rollout plan. Bias toward keeping raw data longer when in doubt; only downsample metric classes where you can prove coarser resolution still answers the questions people ask of them.
Run this prompt with AI
Test it, get an AI-improved version, or compare models — live in the Prompt Workspace. No copy-paste.
Related prompts
-
VictoriaMetrics Downsampling ROI and Storage Cost Forecasting Prompt
Model the dollar and disk impact of downsampling and retention changes in VictoriaMetrics — projecting storage growth, per-tier savings, and payback — so cost decisions are made on arithmetic instead of vibes.
-
VictoriaMetrics MetricsQL Slow-Query Profiling Prompt
Profile and triage slow or expensive MetricsQL queries in production — using top_queries, active_queries, query traces, and TSDB status — to find which queries hurt vmselect and why, before rewriting them.
-
VictoriaMetrics vmagent Scrape Target Debugging Prompt
Systematically diagnose down, missing, or flapping scrape targets in vmagent — walking service discovery, relabeling drops, and scrape failures — so metrics stop silently disappearing from VictoriaMetrics.
-
VictoriaMetrics Capacity Planning and Resource Sizing Prompt
Build a capacity model for VictoriaMetrics — deriving CPU, RAM, disk, and node counts from ingestion rate, active series, churn, and retention, with headroom for query load and growth.
More Victoria Metrics prompts & error guides
Browse every Victoria Metrics prompt and troubleshooting guide in one place.
Reading prompts? Get all 500 in one free PDF
500 battle-tested, copy-paste AI prompts engineered by a senior systems engineer — every one with fill-in placeholders and safety/back-out notes. Drop your email and it's yours.
- 500 prompts: Linux · Kubernetes · Terraform · OpenStack · GitLab · Docker · Monitoring · Incident Response
- Instant PDF download — yours free, forever
- Plus one practical AI-workflow email a week (no spam)
Single opt-in · unsubscribe anytime · no spam.