telegraf

CLI Tool

influxdata/telegraf

Agent for collecting, processing, and writing metrics, logs, and data.

Overview

Telegraf is a plugin-driven server agent for collecting and sending metrics and events from databases, systems, and IoT sensors. It supports over 300 plugins for inputs, outputs, and aggregators, compiles to a static binary with no external dependencies.

README Preview

#  Telegraf\n\n[](https://godoc.org/github.com/influxdata/telegraf)\n[](https://hub.docker.com/_/telegraf/)\n[](https://goreportcard.com/report/github.com/influxdata/telegraf)\n[](https://circleci.com/gh/influxdata/telegraf)\n\nTelegraf is an agent for collecting, processing, aggregating, and writing\nmetrics, logs, and other arbitrary data.\n\n* Offers a comprehensive suite of over 300 plugins, covering a wide range of\n  functionalities including system monitoring, cloud services, and message\n  passing\n* Enables the integration of user-defined code to collect, transform, and\n  transmit data efficiently\n* Compiles into a standalone static binary without any external dependencies,\n  ensuring a streamlined deployment process\n* Utilizes TOML for configuration, providing a user-friendly and unambiguous\n  setup experience\n* Developed with contributions from a diverse community of over 1,200\n  contributors\n\nUsers can choose plugins from a wide range of topics, including but not limited\nto:\n\n* Devices: [OPC UA][], [Modbus][]\n* Logs: [File][], [Tail][], [Directory Monitor][]\n* Messaging: [AMQP][], [Kafka][], [MQTT][]\n* Monitoring: [OpenTelemetry][], [Prometheus][]\n* Networking: [Cisco TelemetryMDT][], [gNMI][]\n* System monitoring: [CPU][], [Memory][], [Disk][], [Network][], [SMART][],\n  [Docker][], [Nvidia SMI][], etc.\n* Universal: [Exec][], [HTTP][], [HTTP Listener][], [SNMP][], [SQL][]\n* Windows: [Event Log][], [Management Instrumentation][],\n  [Performance Counters][]\n\n## 🔨 Installation\n\nFor binary builds, Docker images, RPM & DEB packages, and other builds of\nTelegraf, please see the [install guide](/docs/INSTALL_GUIDE.md).\n\nSee the [releases documentation](/docs/RELEASES.md) for details on versioning\nand when releases are made.\n\n## 💻 Usage\n\nUsers define a TOML configuration with the plugins and settings they wish to\nuse, then pass that configuration to Telegraf. The Telegraf agent then\ncollects data from inputs at each interval a

FAQ (5)

Troubleshooting
How to fix Telegraf opcua_listener permanent disconnect with StatusBadNodeIDUnknown error?

Upgrade to Telegraf v1.40.0 or later. The bug is in gopcua's reconnect state machine: when a subscription fails to recreate during auto-reconnect (e.g., StatusBadNodeIDUnknown 0x80340000 because a monitored node no longer exists in the server address space), the client is left in Connected state with no active subscriptions and a dead publish loop, so Telegraf never retries and stays disconnected until restarted. The fix (gopcua/opcua#877) landed in gopcua v0.9.1, which ships with Telegraf v1.40.0+. Until you can upgrade, the only workaround is restarting the Telegraf service when the disconnect occurs (e.g., via a watchdog/monitoring alert on the no subscriptions to resume debug log).

GitHub Issue #19186
Troubleshooting
How to fix Telegraf OPC UA listener 'EOF' error when monitoring over 1150 nodes?

This is a known bug (issue #14568) where the OPC UA listener plugin sends too large a request when many nodes are configured with a secure connection. The server rejects it with 'BadTcpMessageTooLarge', causing an 'EOF' error. Workaround: split your nodes into groups of around 500 across multiple [[inputs.opcua_listener]] instances or group blocks. A permanent batching fix is being developed.

GitHub Issue #16548
Troubleshooting
How do I fix the Telegraf nightly Docker image showing an old or stale version?

This was caused by a stale public distribution/origin artifact after the nightly CI and S3 publish had completed successfully; it was not a Docker build failure. InfluxData resolved the distribution issue. Update the image with:

docker run --pull=always --rm quay.io/influxdb/telegraf-nightly:alpine --version

If the old image is still used, remove it and pull it again:

docker image rm quay.io/influxdb/telegraf-nightly:alpine
docker pull quay.io/influxdb/telegraf-nightly:alpine

During the incident, the affected image reported Telegraf 1.39.0-f6fa1073 instead of the expected nightly commit 511c852e. As a temporary workaround, use the artifact from the latest successful CircleCI nightly job or build Telegraf from the required commit.

GitHub Issue #19013
Troubleshooting
Why is Telegraf's inputs.nftables plugin very slow when reading large nftables sets?

The plugin was running nft without --terse, causing it to dump every element in every nftables set. On large or contended sets this can take minutes or hours. Upgrade Telegraf to a release that includes the inputs.nftables --terse fix. The plugin then passes --terse when "sets" is not included in include, for example:

[[inputs.nftables]]
  include = ["tables", "chains"]

If you need set metrics, upgrade nft to 1.1.7 or newer. That version can return set element counts with --terse, avoiding a full element dump. Verify with nft --version. On older Telegraf or nft releases, the temporary workaround is to avoid monitoring sets or reduce the size of the sets being inspected.

GitHub Issue #19502
Troubleshooting
Why is the Telegraf system uptime metric reported as a gauge type in Prometheus?

A bug in Telegraf (unreleased 1.39.0) incorrectly registered the 'uptime' metric as a gauge. The correct type is counter since uptime only increases. This issue will be fixed before the release. For affected development builds, a workaround is to override the metric type in Prometheus using metric_relabel_configs or relabeling rules to treat it as a counter. Upgrade to the latest stable version once fixed.

GitHub Issue #18952