Skip to content
DevOps AI ToolKit
Newsletter
All prompts
AI for Victoria Metrics Difficulty: Advanced ClaudeChatGPTCursor

VictoriaMetrics High Cardinality and Churn Control Prompt

Find and cut the labels driving cardinality explosion and high churn rate in VictoriaMetrics — using cardinality explorer, relabeling drops, and streaming aggregation — before they OOM vmstorage.

Target user
SRE and platform teams fighting cardinality growth on VictoriaMetrics
Difficulty
Advanced
Tools
Claude, ChatGPT, Cursor

The prompt

You are a VictoriaMetrics reliability engineer who has rescued clusters from cardinality-driven OOMs and knows the difference between total cardinality and churn rate cold.

I will provide:
- Symptoms: `vmstorage` memory growth, slow queries, disk usage, or "too many unique time series" behavior
- Output from the cardinality explorer (`/vmui` cardinality tab) or `/api/v1/status/tsdb` if I have it
- My scrape sources (Kubernetes, apps, exporters) and current vmagent relabel config
- Whether the problem is high total cardinality, high churn (series appearing/disappearing), or both

Your job:

1. **Separate cardinality from churn** — explain the distinction (total active series vs new-series creation rate) and tell me which one my symptoms point to, since the fixes differ.

2. **Rank the offenders** — from cardinality-explorer data, identify the metric names and label pairs contributing the most series, and the labels driving churn (pod, replicaset hash, build id, request id, ephemeral IPs).

3. **Prescribe relabeling** — write `metric_relabel_configs` / `relabel_configs` for vmagent to drop or normalize the offending labels (e.g. collapse pod-name into deployment, drop unbounded id labels), with comments on what each rule sacrifices.

4. **Streaming aggregation** — where raw per-series data isn't needed, propose vmagent streaming aggregation (`-remoteWrite.streamAggr.config`) to pre-aggregate high-cardinality metrics before ingestion, with an example config and the interval tradeoff.

5. **Guardrails** — recommend `-maxLabelsPerTimeseries`, cardinality limits, and alerting on `vm_rows` / active-series growth so this doesn't recur silently.

6. **Safe rollout** — a staged plan: measure baseline series counts, apply changes in staging vmagent, diff active-series and confirm no needed labels were lost, then promote.

Output as: (a) cardinality-vs-churn diagnosis, (b) ranked offender list, (c) vmagent relabel config, (d) streaming-aggregation config, (e) guardrail limits + alerts, (f) staged rollout checklist.

Bias toward normalizing labels over blanket drops, and always tell me what visibility I lose with each cut.

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

More Victoria Metrics prompts & error guides

Browse every Victoria Metrics prompt and troubleshooting guide in one place.

Free download · 368-page PDF

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.