AI for Telegraf
Collect, process, and ship metrics with Telegraf and AI — input and output plugins, processors and aggregators, tags and routing, buffering, and the InfluxDB/Prometheus pipeline.
27 copy-paste prompts · 50 in-depth guides Jump to prompts Jump to guides
Prompts
- Intermediate
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.
- Claude
- ChatGPT
- Cursor
Open prompt - Advanced
Design Durable Telegraf Output Delivery and Failover
Architect Telegraf output delivery so metrics survive a long output outage: per-output buffer isolation, a disk-backed spool, a secondary/failover output, and correct retry and timeout semantics — instead of silently dropping data the moment the primary destination stalls.
- Claude
- ChatGPT
- Cursor
Open prompt - Advanced
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.
- Claude
- ChatGPT
- Cursor
Open prompt - Intermediate
Configure Telegraf basicstats and histogram Aggregators
Design aggregators.basicstats and aggregators.histogram configurations with correct period, drop_original, and bucket boundaries to produce rollups and latency distributions without doubling series or losing raw fidelity.
- Claude
- ChatGPT
- Cursor
Open prompt - Intermediate
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.
- Claude
- ChatGPT
- Cursor
Open prompt - Advanced
Telegraf Exec & Execd Custom Input Prompt
Build custom metric collectors with inputs.exec (run a script per interval) and inputs.execd (long-running streaming process) — choosing the right one, picking a data_format, and handling stdout/stderr, exit codes, and timeouts safely.
- Claude
- ChatGPT
- Cursor
Open prompt - Advanced
Control High Cardinality in a Telegraf Pipeline
Find and cut cardinality-driving tags in a Telegraf pipeline using processors (regex, enum, converter, dedup), tag stripping, and aggregation so storage stays healthy and queries stay fast without losing the dimensions that matter.
- Claude
- ChatGPT
- Cursor
Open prompt - Intermediate
Telegraf HTTP JSON Input Design Prompt
Poll REST/JSON HTTP endpoints with inputs.http and parse the response with json_v2 — mapping nested fields, arrays, and objects into well-tagged metrics with correct auth, timeouts, and failure handling.
- Claude
- ChatGPT
- Cursor
Open prompt - Intermediate
Design a Telegraf outputs.influxdb_v2 Output for Reliable Writes
Configure the outputs.influxdb_v2 plugin with correct org/bucket/token handling, batching, retries, timeouts, and content-coding so writes stay durable and efficient against InfluxDB 2.x / Cloud without dropping metrics under backpressure.
- Claude
- ChatGPT
- Cursor
Open prompt - Intermediate
Telegraf IPMI Hardware Metrics Prompt
Collect bare-metal health with inputs.ipmi_sensor — temperatures, fan speeds, voltages, PSU and chassis status from BMCs over local or LAN interfaces — with safe credentials, sane intervals, and tag mapping for fleet dashboards.
- Claude
- ChatGPT
- Cursor
Open prompt - Advanced
Telegraf Jolokia JMX Input Prompt
Collect JVM and application MBeans through Jolokia with inputs.jolokia2_agent — heap/GC, thread pools, and app-specific metrics — mapping MBean attributes to tags and fields with the right auth, batching, and cardinality control.
- Claude
- ChatGPT
- Cursor
Open prompt - Advanced
Telegraf Kafka Consumer Input Prompt
Configure inputs.kafka_consumer to ingest metrics/events from Kafka topics — consumer group balancing, offset handling, TLS/SASL auth, message parsing, and backpressure — so Telegraf becomes a reliable stream consumer, not a lag generator.
- Claude
- ChatGPT
- Cursor
Open prompt - Advanced
Design a Telegraf outputs.kafka Pipeline with Topic Routing
Configure the outputs.kafka plugin with dynamic topic routing, partition keys, serialization, compression, acks, and TLS/SASL so Telegraf publishes metrics to Kafka reliably and with sane partition distribution.
- Claude
- ChatGPT
- Cursor
Open prompt - Advanced
Deploy Telegraf as a Kubernetes DaemonSet
Design a Telegraf DaemonSet (plus optional Deployment for cluster-scoped metrics) with correct RBAC, resource limits, env/secret injection, config via ConfigMap, and node/pod scoping so metrics collection is complete but not duplicated or resource-abusive.
- Claude
- ChatGPT
- Cursor
Open prompt - Advanced
Tune Telegraf Metric Buffer, Batch, and Flush Settings
Right-size metric_buffer_limit, metric_batch_size, flush_interval, flush_jitter, and collection_jitter across the agent and outputs so Telegraf survives output outages and traffic spikes without dropping metrics or thundering-herd flushing.
- Claude
- ChatGPT
- Cursor
Open prompt - Beginner
Telegraf Net Response & Port Check Prompt
Build synthetic reachability and latency checks with inputs.net_response and inputs.ping — TCP/UDP port probes, expected-string matching, timeouts, and result-code mapping — so connectivity failures become clean, alertable metrics.
- Claude
- ChatGPT
- Cursor
Open prompt - Intermediate
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.
- Claude
- ChatGPT
- Cursor
Open prompt - Intermediate
Configure Telegraf outputs.prometheus_client for Scrape Exposure
Stand up the outputs.prometheus_client plugin as a scrape target with correct metric_version, expiration, TLS, and string/collector handling so Prometheus reads stable, correctly-typed metrics without stale or duplicated series.
- Claude
- ChatGPT
- Cursor
Open prompt - Advanced
Telegraf Prometheus Scrape Input Prompt
Use inputs.prometheus to scrape /metrics endpoints and Kubernetes pods — target discovery, relabeling, metric_version selection, and namespace/label filtering — so Telegraf replaces or complements a Prometheus server without cardinality blowups.
- Claude
- ChatGPT
- Cursor
Open prompt - Intermediate
Build Telegraf regex and enum Processors for Tag Normalization
Compose processors.regex and processors.enum blocks to normalize noisy tag/field values — rewriting labels, extracting fields from paths, mapping status codes to human states, and collapsing high-variance values — without exploding series cardinality.
- Claude
- ChatGPT
- Cursor
Open prompt - Intermediate
Manage Telegraf Credentials with Secret Stores
Move tokens, passwords, and keys out of telegraf.conf into secret-store plugins (os keyring, systemd credentials, HashiCorp Vault, cloud secret managers) using the @{{ secretstore.key }} reference syntax so no credential is ever committed in plaintext.
- Claude
- ChatGPT
- Cursor
Open prompt - Advanced
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.
- Claude
- ChatGPT
- Cursor
Open prompt - Advanced
Telegraf SQL Database Input Prompt
Turn arbitrary SQL queries into metrics with inputs.sql — driver/DSN setup, mapping result columns to tags and fields, query scheduling, and timeouts — so business and DB-internal metrics flow into your TSDB without a custom exporter.
- Claude
- ChatGPT
- Cursor
Open prompt - Advanced
Design a Telegraf Starlark Processor for Metric Transformation
Write, test, and harden a processors.starlark script that reshapes Telegraf metrics — renaming, deriving fields, computing rates from counters, splitting/merging metrics, and dropping noise — with correct handling of the apply(metric) contract and per-instance state.
- Claude
- ChatGPT
- Cursor
Open prompt - Advanced
Migrate StatsD and collectd Ingestion to Telegraf
Plan and execute a migration from StatsD servers and collectd daemons onto Telegraf's inputs.statsd and inputs.collectd (or socket_listener) with parallel-run validation, metric-name/tag mapping, and cutover so no metrics are lost or renamed unexpectedly.
- Claude
- ChatGPT
- Cursor
Open prompt - Intermediate
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.
- Claude
- ChatGPT
- Cursor
Open prompt - Advanced
Telegraf Tail Input: Logs to Metrics Prompt
Turn plain-text and structured log files into metrics with inputs.tail — grok/regex/JSON parsing, multiline handling, and offset tracking — so error rates and latencies flow into your TSDB without a full log pipeline.
- Claude
- ChatGPT
- Cursor
Open prompt
Guides
- · 9 min read
Telegraf Error Guide: '[outputs.cloudwatch] NoCredentialProviders' — Fix AWS Credentials
Fix Telegraf's [outputs.cloudwatch] 'NoCredentialProviders: no valid providers in chain': supply an IAM role, region, and cloudwatch:PutMetricData so metrics ship to CloudWatch.
Read guide - · 8 min read
Telegraf Error Guide: '[outputs.datadog] received bad status code, 403' — Fix Datadog API Auth
Fix Telegraf's [outputs.datadog] 'received bad status code, 403': supply a valid DD API key, match the correct site URL (datadoghq.com vs .eu), and reference ${DD_API_KEY}.
Read guide - · 8 min read
Telegraf Error Guide: '[inputs.disk] error getting disk usage info: permission denied' — Fix Disk Access
Fix Telegraf's [inputs.disk] 'error getting disk usage info: permission denied' by excluding restricted mounts with ignore_fs, setting HOST_MOUNT_PREFIX, and fixing autofs/fuse stat failures.
Read guide - · 9 min read
Telegraf Error Guide: '[outputs.elasticsearch] no Elasticsearch node available' — Fix Cluster Connectivity
Fix Telegraf's [outputs.elasticsearch] 'health check timeout: no Elasticsearch node available' error: correct the URL and port, restore cluster health, and fix auth and TLS.
Read guide - · 8 min read
Telegraf Error Guide: '[inputs.exec] executable file not found in $PATH' — Fix Exec Command Paths
Fix Telegraf's [inputs.exec] 'executable file not found in $PATH' error: use absolute command paths, chmod +x the script, set PATH in the systemd unit, and ship the binary into containers.
Read guide - · 9 min read
Telegraf Error Guide: '[inputs.gnmi] rpc error: code = Unavailable ... connection refused' — Fix gNMI Telemetry
Fix Telegraf's [inputs.gnmi] 'rpc error: code = Unavailable ... connect: connection refused': enable the device gRPC port, set TLS, credentials, encoding, and subscription paths.
Read guide - · 8 min read
Telegraf Error Guide: '[outputs.graphite] connection refused' — Fix Carbon Plaintext Delivery
Fix Telegraf's [outputs.graphite] 'connection refused' on tcp 2003: confirm the Carbon plaintext listener, port, TCP vs UDP, and firewall so metrics reach Graphite.
Read guide - · 8 min read
Telegraf Error Guide: '[inputs.http] context deadline exceeded' — Fix HTTP Input Timeouts
Fix Telegraf's [inputs.http] 'context deadline exceeded (Client.Timeout exceeded while awaiting headers)' by raising timeout, checking DNS/proxy latency, and tuning a slow metrics endpoint.
Read guide - · 9 min read
Telegraf Error Guide: '[outputs.influxdb_v2] 429 Too Many Requests' — Fix InfluxDB Cloud Rate Limits
Fix Telegraf's [outputs.influxdb_v2] '429 Too Many Requests' error: respect Retry-After headers, cut write rate and cardinality, enable gzip, and aggregate under InfluxDB Cloud plan limits.
Read guide - · 8 min read
Telegraf Error Guide: 'parsing metrics failed: invalid character' — Fix JSON Parse Errors
Fix Telegraf's [inputs.http] 'parsing metrics failed: invalid character <' error: the endpoint returned HTML not JSON. Correct data_format, json_query, json_time_key, and json_v2 parser config.
Read guide - · 9 min read
Telegraf Error Guide: '[inputs.kafka_consumer] run out of available brokers' — Fix Broker Connectivity
Fix Telegraf's [inputs.kafka_consumer] 'client has run out of available brokers' connection refused error: correct broker_list, fix advertised.listeners, set SASL/TLS, and match the consumer group.
Read guide - · 9 min read
Telegraf Error Guide: '[inputs.mongodb] server selection timeout' — Fix MongoDB Connection
Fix Telegraf's [inputs.mongodb] 'server selection error: server selection timeout' by correcting the servers URI, authSource, replica set name, TLS, and network access.
Read guide - · 8 min read
Telegraf Error Guide: '[inputs.mqtt_consumer] dial tcp: connection refused' — Fix MQTT Broker Connectivity
Fix Telegraf's [inputs.mqtt_consumer] 'dial tcp 10.0.0.6:1883: connect: connection refused': correct broker host/port, tcp vs ssl scheme, credentials, client_id, and topics.
Read guide - · 9 min read
Telegraf Error Guide: '[inputs.mysql] Error 1045: Access denied' — Fix MySQL Auth and Grants
Fix Telegraf's [inputs.mysql] 'Error 1045: Access denied for user telegraf': correct the DSN password, host-based user, and PROCESS/REPLICATION CLIENT grants so MySQL metrics collect.
Read guide - · 8 min read
Telegraf Error Guide: 'outputs.file: open metrics.out: permission denied' — Fix File Output Permissions
Fix Telegraf's outputs.file 'permission denied' writing /var/log/telegraf/metrics.out: correct directory ownership, SELinux, and logrotate so the file output writes reliably.
Read guide - · 9 min read
Telegraf Error Guide: 'panic: runtime error: nil pointer dereference' — Fix Telegraf Crashes
Fix Telegraf's 'panic: runtime error: invalid memory address or nil pointer dereference' crash: capture the goroutine stack, isolate the plugin with --input-filter, and upgrade the version.
Read guide - · 8 min read
Telegraf Error Guide: '[inputs.ping] socket: operation not permitted' — Fix Native ICMP Capability
Fix Telegraf's [inputs.ping] 'socket: operation not permitted': grant CAP_NET_RAW for native ICMP, or switch to method=exec using the system ping so host checks succeed.
Read guide - · 8 min read
Telegraf Error Guide: '[inputs.postgresql_extensible] connect: connection refused' — Fix Postgres Connectivity
Fix Telegraf's [inputs.postgresql_extensible] 'connect: connection refused' error: start Postgres on the right port, set listen_addresses, open pg_hba.conf, and fix the address DSN.
Read guide - · 8 min read
Telegraf Error Guide: '[inputs.procstat] open /var/run/myapp.pid: no such file or directory' — Fix Process Matching
Fix Telegraf's [inputs.procstat] 'open /var/run/myapp.pid: no such file or directory': correct the pid_file, or match by pattern/exe/systemd_unit/cgroup instead so process metrics collect.
Read guide - · 8 min read
Telegraf Error Guide: '[inputs.prometheus] connection refused' — Fix Scrape Target Errors
Fix Telegraf's [inputs.prometheus] 'connection refused' HTTP request error: verify the exporter is up on the right port, correct the URL and TLS, fix Kubernetes discovery, and add a bearer token.
Read guide - · 8 min read
Telegraf Error Guide: '[inputs.redis] NOAUTH Authentication required' — Fix Redis Auth
Fix Telegraf's [inputs.redis] 'NOAUTH Authentication required': add the password to the servers URI, use Redis 6 ACL users, or rediss:// TLS so Redis metrics collect.
Read guide - · 8 min read
Telegraf Error Guide: '[inputs.smart] smartctl --scan: permission denied' — Fix S.M.A.R.T. Privileges
Fix Telegraf's [inputs.smart] 'failed to run command /usr/sbin/smartctl --scan: permission denied': enable use_sudo with a sudoers entry, set the path, and cover NVMe devices.
Read guide - · 8 min read
Telegraf Error Guide: '[inputs.win_perf_counters] object was not found' — Fix Windows Counters
Fix Telegraf's [inputs.win_perf_counters] 'The specified object was not found on the computer' error: correct counter/object names, rebuild counters with lodctr /R, and verify with Get-Counter.
Read guide - · 8 min read
Telegraf Error Guide: 'took longer to collect than collection interval' — Fix Slow Inputs
Fix Telegraf 'took longer to collect than collection interval': give slow inputs their own interval, tune timeouts, split heavy plugins, and stop skipped collections and gaps in metrics.
Read guide - · 8 min read
Telegraf Error Guide: 'context deadline exceeded' — Fix Output Write Timeouts
Fix Telegraf 'context deadline exceeded (Client.Timeout exceeded while awaiting headers)': diagnose slow or stalled output writes, tune timeout and batch size, and stop dropped metrics.
Read guide - · 8 min read
Telegraf Error Guide: 'did not complete within its flush interval' — Fix Slow Output Flushes
Fix Telegraf 'did not complete within its flush interval': speed up or isolate a slow output, align timeout with flush_interval, batch writes, and stop backed-up buffers and dropped metrics.
Read guide - · 8 min read
Telegraf Error Guide: '[inputs.docker] Got permission denied ... docker.sock' — Fix Socket Access
Fix Telegraf's [inputs.docker] permission denied on docker.sock: add the telegraf user to the docker group, fix socket ownership, container privileges, and SELinux so container metrics collect.
Read guide - · 9 min read
Telegraf Error Guide: '[inputs.exec] exec: exit status 1' — Fix Failing Exec Commands
Fix Telegraf's [inputs.exec] exit status 1 error: repair the command path, permissions, environment, working directory, and data_format so external scripts return parseable metrics.
Read guide - · 8 min read
Telegraf Error Guide: '[agent] flush_interval is not divisible / interval mismatch' — Fix Agent Timing
Fix Telegraf agent timing warnings and gather-timeout errors: set interval, flush_interval, flush_jitter, and metric_buffer_limit correctly so collection and flushing stay balanced and lossless.
Read guide - · 8 min read
Telegraf Error Guide: 'outputs.http 429 Too Many Requests' — Fix Rate-Limited Writes
Fix Telegraf's outputs.http 429 Too Many Requests errors: respect rate limits, tune flush_interval and batch size, add jitter and gzip, aggregate metrics, and stop throttled write drops.
Read guide - · 8 min read
Telegraf Error Guide: '[inputs.http] ... connection refused' — Fix HTTP Endpoint Collection
Fix Telegraf's [inputs.http] connection refused error: verify the endpoint URL, listening port, bind address, TLS scheme, timeouts, and firewall so HTTP/JSON metrics collect reliably.
Read guide - · 9 min read
Telegraf Error Guide: 'outputs.influxdb 401 Unauthorized' — Fix InfluxDB Write Auth
Fix Telegraf's outputs.influxdb 401 Unauthorized write failures: correct username/password or token auth, InfluxDB user permissions, org and bucket scoping, and TLS-terminated proxies.
Read guide - · 8 min read
Telegraf Error Guide: 'outputs.influxdb database not found' — Fix Missing InfluxDB DB
Resolve Telegraf's outputs.influxdb database not found errors: create the database, enable skip_database_creation correctly, grant create permissions, and match the database name in config.
Read guide - · 8 min read
Telegraf Error Guide: 'outputs.influxdb_v2 404 bucket not found' — Fix Bucket & Org
Resolve Telegraf's outputs.influxdb_v2 404 bucket not found errors: create or name the bucket correctly, set the right organization, scope the API token, and match the v2 write endpoint.
Read guide - · 9 min read
Telegraf Error Guide: 'outputs.influxdb x509: certificate signed by unknown authority' — Fix TLS
Fix Telegraf's outputs.influxdb x509 certificate signed by unknown authority errors: trust the CA, set tls_ca, handle self-signed and private CAs, and verify the InfluxDB TLS chain.
Read guide - · 9 min read
Telegraf Error Guide: 'error loading config file ... invalid configuration' — Fix TOML and Plugin Config
Fix Telegraf's 'error loading config file invalid configuration' at startup: repair broken TOML syntax, duplicate keys, bad table headers, and unknown options with telegraf --test.
Read guide - · 8 min read
Telegraf Error Guide: 'invalid data format: <name>' — Fix the Input Parser
Fix Telegraf's 'invalid data format' error: choose a supported parser (influx, json_v2, prometheus, csv, grok), spell data_format correctly, and configure the matching parser sub-table.
Read guide - · 9 min read
Telegraf Error Guide: 'outputs.kafka circuit breaker is open' — Fix Kafka Write Failures
Fix Telegraf's outputs.kafka circuit breaker is open errors: recover unreachable brokers, correct broker lists and TLS/SASL auth, resolve leader elections, and stop metric drops to Kafka.
Read guide - · 9 min read
Telegraf Error Guide: 'metric buffer overflow' — Fix Dropped Metrics on a Full Buffer
Fix Telegraf's metric buffer overflow warnings: unblock a failing output, tune metric_buffer_limit and flush_interval, add disk buffering, and stop silent metric drops when writes stall.
Read guide - · 8 min read
Telegraf Error Guide: 'metric parse error ... invalid number' — Fix Line Protocol Parsing
Fix Telegraf's 'metric parse error invalid number' when parsing input data: correct malformed line protocol, missing integer suffixes, unquoted strings, and wrong data_format settings.
Read guide - · 9 min read
Telegraf Error Guide: 'partial write: field type conflict' — Fix InfluxDB Type Clashes
Fix Telegraf's partial write field type conflict errors: reconcile integer vs float vs string field types in InfluxDB, pin types with converter/enum processors, and quarantine bad series.
Read guide - · 8 min read
Telegraf Error Guide: 'partial write: points beyond retention policy' — Fix Timestamps
Fix Telegraf's partial write points beyond retention policy errors: correct out-of-range timestamps, wrong precision, clock skew, backfill windows, and retention duration in InfluxDB.
Read guide - · 8 min read
Telegraf Error Guide: 'outputs.prometheus_client bind: address already in use' — Fix Port
Fix Telegraf's outputs.prometheus_client listen tcp bind address already in use: find the process holding the port, resolve duplicate agents, change listen, and free 9273 cleanly.
Read guide - · 9 min read
Telegraf Error Guide: '[inputs.snmp] agent ... request timeout' — Fix SNMP Collection Timeouts
Fix Telegraf's [inputs.snmp] request timeout error: correct SNMP version and community, reachability, credentials, MIB translation, and timeout/retries so device metrics collect reliably.
Read guide - · 9 min read
Telegraf Error Guide: '[inputs.sqlserver] Login failed for user' — Fix SQL Server Auth
Fix Telegraf's [inputs.sqlserver] 'Login failed for user' error: correct the connection string, grant VIEW SERVER STATE, enable the login, fix encryption settings, and reach the SQL port.
Read guide - · 9 min read
Telegraf Error Guide: '[processors.starlark] ... error in Starlark' — Fix Starlark Script Errors
Fix Telegraf's [processors.starlark] script error: repair the apply() function, handle None fields and types, avoid unsupported Python features, and debug metric mutation with telegraf --test.
Read guide - · 8 min read
Telegraf Error Guide: '[inputs.tail] ... permission denied' — Fix Log File Access
Fix Telegraf's [inputs.tail] permission denied error: grant the telegraf user read access to log files, fix directory traversal permissions, group membership, and SELinux/AppArmor policy.
Read guide - · 8 min read
Telegraf Error Guide: 'Undefined but requested input: <name>' — Fix Unknown Input Plugin
Fix Telegraf's 'Undefined but requested input' / unknown input plugin error: correct misspelled plugin names, wrong table headers, and version mismatches with telegraf plugins inputs.
Read guide - · 8 min read
Telegraf Error Guide: 'write failed: 413 Request Entity Too Large' — Fix Batch Size
Fix Telegraf's write failed 413 Request Entity Too Large errors: shrink metric_batch_size, raise proxy and InfluxDB body limits, tune content_encoding gzip, and keep write payloads in range.
Read guide - · 9 min read
Telegraf Error Guide: 'Error writing to outputs.influxdb: could not write' — Fix Connectivity
Fix Telegraf's agent Error writing to outputs.influxdb could not write failures: diagnose connection refused, i/o timeout, DNS, and dial errors, then restore delivery and drain the buffer.
Read guide