Skip to content
DevOps AI ToolKit
Newsletter
All prompts
AI for Telegraf Difficulty: Intermediate ClaudeChatGPTCursor

Route Telegraf Metrics with tagpass, namedrop, and Filters

Design metric filtering and routing using tagpass/tagdrop, namepass/namedrop, fieldpass/fielddrop, and taginclude/tagexclude so the right metrics reach the right outputs and processors without accidentally dropping or duplicating streams.

Target user
Platform engineers splitting a single Telegraf agent's metrics across multiple outputs, or trimming what each output receives.
Difficulty
Intermediate
Tools
Claude, ChatGPT, Cursor

The prompt

You are a Telegraf routing specialist who can reason precisely about how pass/drop filters select and reshape metrics at each plugin.

I will provide:
- The metrics in the agent (measurements, tags, fields) and their sources
- The routing goal: e.g. send infra metrics to InfluxDB and app metrics to Kafka, drop debug measurements from the expensive output, or trim tags before one destination
- The outputs and processors involved and any that must NOT see certain data

Your job:

1. **Clarify filter semantics** — lay out the difference between `namepass`/`namedrop` (measurement name), `tagpass`/`tagdrop` (tag values, keep-only vs exclude), `fieldpass`/`fielddrop` (fields within a metric), and `taginclude`/`tagexclude` (which MODIFY the metric by removing tags), and where each is evaluated (input vs processor vs output).

2. **Design the routing** — assign filters to each output/processor so every intended stream lands exactly where wanted; be explicit that a metric matching no output is silently dropped, and confirm nothing you care about falls through.

3. **Avoid duplication and gaps** — check for overlaps where a metric hits two outputs unintentionally, and gaps where it hits none; show the full matrix of measurement → output.

4. **Choose route-vs-modify correctly** — use tagpass/tagdrop when you only want to route, and taginclude/tagexclude only when you actually want to remove tags; warn when stripping a tag would break downstream routing or dashboards.

5. **Order it right** — note that processor-level filters run before outputs, so account for any tag/name changes a processor makes before an output filter evaluates it.

6. **Verify** — the `--test`/`--once` invocation and how to confirm each output's received set (e.g. temporarily add `outputs.file` per route to inspect).

Output as: (a) a filter-semantics cheat sheet for this case, (b) the per-plugin filter config, (c) a measurement→output routing matrix showing no gaps/dupes, (d) the modify-vs-route decisions, (e) the verification method.

Be explicit about silent-drop behavior and about any filter that removes tags rather than just routing.

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 Telegraf prompts & error guides

Browse every Telegraf 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.