selfhost.directory

The index of self-hostable projects — ranked, categorized and served with live updates.
Own your data and stop giving it to big tech.

Telegraf logo

Self-host Telegraf

v1.40.3

Metrics and logs collection agent with 300+ plugins

ReleaseOpen SourceMIT
docker run --rm --volume $PWD/config.toml:/etc/telegraf/telegraf.conf telegraf
Updatedlast week
LanguageGo
Setup difficultyEasy
Stars
17 908
Docker
telegraf

What is Telegraf?

Telegraf alternatives

Should you self-host Telegraf?

Telegraf scores 77/100 on selfhost.directory (how scoring works) and ranks #11 of 105 in Monitoring & observability. It has 17 908 GitHub stars, +56 in the last 30 days.

It shipped 17 stable releases in the past year. The latest, v1.40.3, came out on 2 November 2026. New versions land roughly every 3 weeks.

Setup is easy: most people get it running in one sitting. An official Docker image is available. It is MIT-licensed and written mostly in Go.

Its closest alternative on selfhost.directory is prometheus (92/100, 67 639 stars). It scores higher overall, so compare the two before you pick. See Telegraf vs prometheus side by side.

Features

  • Buffered outputsDisk buffer mode is described as experimental.
  • Custom builder
  • Custom plugin code
  • Environment variable substitution
  • Large plugin catalog
  • Log Collection
  • Metric filtering
  • Metrics collection and processing
  • Plugin Architecture
  • Prometheus and OpenTelemetry ingestion
  • Secret stores
  • Single static binary
  • Test and one-shot modes
  • TOML Configuration
  • Windows data sources

Telegraf README

tiger Telegraf

GoDoc Docker pulls Go Report Card Circle CI

Telegraf is an agent for collecting, processing, aggregating, and writing metrics, logs, and other arbitrary data.

  • Offers a comprehensive suite of over 300 plugins, covering a wide range of functionalities including system monitoring, cloud services, and message passing
  • Enables the integration of user-defined code to collect, transform, and transmit data efficiently
  • Compiles into a standalone static binary without any external dependencies, ensuring a streamlined deployment process
  • Utilizes TOML for configuration, providing a user-friendly and unambiguous setup experience
  • Developed with contributions from a diverse community of over 1,200 contributors

How to install Telegraf

Install Telegraf with Docker

docker pull telegraf
docker run --rm --volume $PWD/config.toml:/etc/telegraf/telegraf.conf telegraf

Telegraf is available as an Official image on DockerHub.

How to configure Telegraf

  • intervalAgent setting: default data collection interval for all inputs.

    values: duration string (ns, us/µs, ms, s, m, h)

  • round_intervalAgent setting: rounds collection interval to the interval (e.g. interval="10s" collects at :00, :10, :20).
  • metric_batch_sizeAgent setting: maximum number of metrics sent to outputs per batch.
  • metric_buffer_limitAgent setting: maximum number of unwritten metrics buffered per output; oldest metrics are overwritten when the buffer fills.
  • collection_jitterAgent setting: jitter metric collection by a random interval to avoid many plugins querying at once.

Telegraf releases & version history

@ Every self-hosted release, weekly

One Monday email with the week's stable releases across the directory.

FAQ

How can I manage series cardinality?

High cardinality can load the destination database heavily; use metric filtering to drop unneeded measurements and tags, write to a database with an appropriate retention policy, and monitor series cardinality.

Why do I get a "no such host" error resolving hostnames that other programs can resolve?

Go's default pure-Go resolver behaves differently than the C library; set GODEBUG=netdns=cgo (in the environment or /etc/default/telegraf) to switch to the cgo resolver.

How can I monitor the Docker Engine Host from within a container?

Mount the host root read-only at /hostfs and set the HOST_ETC, HOST_PROC, HOST_SYS, HOST_VAR, HOST_RUN and HOST_MOUNT_PREFIX environment variables on the Telegraf container.

How do I set the timestamp format for parsing data?

Set timestamp_format using Go's reference-time layout, for example 2006-01-02T15:04:05.000-0700.

What does "Context Deadline exceeded (Client.Timeout while awaiting headers)" mean?

It is a generic Go HTTP-client error caused by a temporary DNS, proxy, firewall or other network hiccup; Telegraf recovers shortly afterwards without data loss.

Could not find a usable config.yml, you may have revoked the CircleCI OAuth app?

This is a CircleCI test-run error; log back into CircleCI (or re-create the GitHub OAuth login) to regenerate the token, then push again or close and reopen the PR.

How can I filter or select specific metrics?

Use selectors to include or exclude entire metrics by name or tag key/value, and modifiers to remove specific tags or fields with glob support.

When is the next release? When will my PR or fix get released?

Telegraf ships four minor releases a year (March, June, September, December) with 2-4 bug-fix releases roughly every three weeks in between; fixes go into the next release while new-feature PRs wait for the next minor release.

Rate this project

Click to rate — no account needed.

0 comments

Posting as guest
Loading comments…