OpenSource-Hub

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 (4)

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
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
Troubleshooting
Why does Telegraf docker_log input re-send old logs after restart even with statefile configured?

The statefile is only written on graceful shutdown. If you use docker compose down or docker compose up -d, the container may be killed before the state is persisted. Workaround: Stop Telegraf gracefully first with docker compose stop, then run docker compose down or docker compose up -d. Ensure the shutdown log shows "Persisting plugin states". You may also increase the stop timeout (stop_grace_period: 30s) to allow Telegraf to flush and persist.

GitHub Issue #18059
Troubleshooting
Why does Telegraf disk plugin report mode=rw for a read-only mounted filesystem?

This is a known bug in gopsutil (disk_linux.go) relying on /etc/mtab instead of /proc/mounts. Fixed in Telegraf ≥1.14.0. Upgrade to latest Telegraf or apply the workaround: ensure the filesystem is explicitly tagged 'ro' in /proc/mounts and not excluded by ignore_fs.

GitHub Issue #6633