Telegraf SNMP Input Plugin Design Prompt
Design a scalable inputs.snmp configuration that polls network gear (switches, routers, PDUs, UPS) with the right OIDs, tables, tag mappings, and translation — without melting the agents or the devices.
- Target user
- Network/observability engineers instrumenting SNMP devices with Telegraf
- Difficulty
- Advanced
- Tools
- Claude, ChatGPT, Cursor
The prompt
You are a senior observability engineer who has polled thousands of SNMP devices with Telegraf and knows exactly how a badly scoped table walk can take down a core switch. Help me design a production `inputs.snmp` configuration.
I will provide:
- Device inventory (vendor, model, firmware) and what I want to monitor (interface counters, CPU/mem, temperature, PSU/fan status, BGP sessions, PDU outlets)
- Available MIBs / OIDs, or the vendor MIB names
- SNMP version (v2c vs v3) and current polling interval
Deliver:
1. **Version & auth** — recommend v2c vs v3 per my security posture; for v3 specify `sec_name`, `auth_protocol`, `priv_protocol`, and how to source secrets from `${ENV}` or a secretstore. Never inline the community string.
2. **Scalar `field` blocks** — the exact OIDs for sysUpTime, CPU, memory, temperature with `conversion` (float/int/hwaddr/ipaddr) and human names.
3. **`table` blocks** — for ifTable/ifXTable and vendor tables: `oid`, which columns to pull, and the `[[inputs.snmp.table.field]]` marked `is_tag = true` (ifName, ifDescr, ifIndex) so series are labeled by interface, not index number. Warn me where a full walk is dangerous and how to scope with explicit indexes.
4. **Translation & agents** — whether to rely on the built-in translator or `path`/compiled MIBs; and how to shard devices across multiple `[[inputs.snmp]]` blocks / agents to parallelize.
5. **Timeouts & retries** — `timeout`, `retries`, and `interval` tuned per device class, with the math on how many OIDs × devices fit in one collection interval.
6. **Counter hygiene** — flag which fields are monotonic counters (ifHCInOctets) that a downstream must `derivative`/`nonNegativeDerivative`, and 32-bit vs 64-bit counter wrap risks on high-speed links.
Output: (a) a commented `inputs.snmp` TOML block, (b) a per-device-class interval/timeout table, (c) a list of tag keys that will define cardinality, and (d) a pre-rollout test plan against one device with `telegraf --test`.
Bias toward: 64-bit counters, tagging by interface name, scoping walks, and secret injection over inline strings.
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
-
Choose and Design the Right Telegraf Input Plugin for a Source
Pick the best Telegraf input plugin for a given data source (an app, host, API, log, queue, or device) and produce a production-ready inputs configuration with the right tags, fields, interval, and parser — instead of guessing between exec, http, prometheus, and a native plugin.
-
Telegraf Docker Input Metrics Collection Prompt
Configure inputs.docker to collect per-container CPU, memory, network, and blkio metrics with the right label mapping, container filtering, and socket permissions — without drowning your TSDB in ephemeral-container cardinality.
-
Telegraf Procstat Process Monitoring Prompt
Design inputs.procstat to track specific processes by pattern, cgroup, systemd unit, or PID file — capturing CPU, RSS, FD count, thread count, and restarts — while keeping series cardinality and lookup cost under control.
-
Design a Telegraf Processor and Aggregator Pipeline
Design an ordered Telegraf processor + aggregator pipeline — tag and field transforms, renaming, dedup, rate/derivative, and windowed aggregation — so metrics arrive at the output clean, correctly typed, and at the right resolution, with the ordering and `order`/`drop_original` semantics right the first time.
More Telegraf prompts & error guides
Browse every Telegraf 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.