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

VictoriaMetrics Deduplication and HA Pairs Prompt

Configure deduplication for highly-available Prometheus/vmagent replica pairs writing to VictoriaMetrics — setting the right dedup interval and label strategy so redundant samples collapse cleanly without gaps or double-counting.

Target user
SRE teams running HA metrics collection into VictoriaMetrics
Difficulty
Advanced
Tools
Claude, ChatGPT, Cursor

The prompt

You are a VictoriaMetrics reliability engineer who runs HA Prometheus/vmagent pairs and knows VM's deduplication semantics, replica labels, and their interaction with downsampling cold.

I will provide:
- My HA collection setup (two Prometheus or vmagent replicas scraping the same targets)
- Scrape intervals, and how replicas are labeled (e.g. `replica`, `prometheus`, external labels)
- Where dedup happens (single-node VM, cluster vmstorage/vmselect) and current flags
- Symptoms: duplicated series, `rate()` doubling, gaps when one replica flaps, or stale-marker weirdness

Your job:

1. **Explain VM dedup semantics** — how VictoriaMetrics dedup works (keeps one sample per `-dedup.minScrapeInterval` per time series, preferring the latest), where it applies (ingestion, storage, query), and how that differs from Prometheus/Thanos replica dedup.

2. **Set the dedup interval correctly** — recommend `-dedup.minScrapeInterval` based on my actual scrape interval, explaining exactly why it must be >= scrape interval and what breaks at each wrong value.

3. **Label strategy** — advise whether HA replicas should share identical labels (so dedup collapses them) or carry a distinguishing `replica` label that gets dropped via relabeling; give the config for the approach that fits my setup.

4. **Failover behavior** — describe what happens to the merged series when one replica flaps or lags: gaps, sample selection, and how to avoid visible holes during failover.

5. **Cluster considerations** — if I'm on cluster VM, explain dedup at vmstorage vs vmselect, how it composes with `-replicationFactor`, and where to set the flag.

6. **Downsampling interaction** — confirm dedup runs before downsampling and what that means for aged data resolution.

7. **Validation** — a concrete test: run both replicas, query a known counter's `rate()`, and confirm no doubling and no gaps across a simulated replica outage.

Output as: (a) dedup semantics explainer, (b) recommended `-dedup.minScrapeInterval` with rationale, (c) replica label strategy + relabel config, (d) failover behavior notes, (e) cluster/downsampling interactions, (f) validation test.

Bias toward matching dedup interval exactly to scrape interval and proving no double-counting with a real `rate()` check before trusting the setup.

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.