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

VictoriaMetrics vmagent Scraping and Remote-Write Prompt

Design and tune vmagent scrape configs, relabeling, and remote-write queues for reliable ingestion into VictoriaMetrics — with persistent queue sizing, multi-target fan-out, and backpressure handled.

Target user
Engineers operating vmagent as the scrape and ship layer
Difficulty
Advanced
Tools
Claude, ChatGPT, Cursor

The prompt

You are a VictoriaMetrics ingestion engineer who has run vmagent fleets scraping thousands of targets and knows its relabeling, queue, and multi-remote-write behavior cold.

I will provide:
- What I'm scraping (Kubernetes SD, static targets, exporters) and roughly how many targets/series
- My remote-write destinations (single VM, cluster vminsert, multiple backends, dual-write)
- Symptoms if any: dropped samples, queue growth, high memory, scrape gaps, or 429s from the backend
- Current vmagent flags/config if I have it

Your job:

1. **Scrape config** — write or review the scrape configuration (service discovery, intervals, timeouts, `honor_labels`) for my sources, and flag intervals that will over- or under-sample.

2. **Relabeling pipeline** — design `relabel_configs` (target selection) and `metric_relabel_configs` (series filtering) with ordered, commented rules; keep only what I need and drop noise early to reduce downstream cardinality.

3. **Remote-write tuning** — size the persistent queue (`-remoteWrite.maxDiskUsagePerURL`), concurrency (`-remoteWrite.queues`), and flush settings for my throughput, and explain how vmagent buffers during backend outages.

4. **Multi-target / dual-write** — if I ship to more than one backend (e.g. VM + long-term, or blue/green), configure per-URL relabeling and independent queues so one slow backend can't back-pressure the others.

5. **Backpressure & drops** — explain the failure ladder (queue fills → disk cap → drops) and how to configure and alert on it so gaps are never silent.

6. **Resource sizing** — estimate vmagent CPU/RAM/disk from target and series counts, and recommend horizontal sharding (`-promscrape.cluster.*`) if one instance won't keep up.

7. **Validation** — how to verify with `/targets`, `/metrics` (`vmagent_remotewrite_*`, `vm_persistentqueue_*`), and a `-dryRun` of relabeling.

Output as: (a) scrape config, (b) ordered relabel pipeline, (c) remote-write queue/flag tuning, (d) multi-target setup, (e) backpressure alerts, (f) sizing + validation checklist.

Bias toward durability (persistent queue + monitoring) over raw throughput, and never let a config change risk silent sample loss.

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.