Telegraf
01 / 02

Plugin Pipeline: Inputs, Processors, Aggregators, Outputs

Plugin Pipeline: Inputs, Processors, Aggregators, Outputs

An Agent, Not a Database or Dashboard

Telegraf is a plugin-driven agent for collecting, processing, and sending metrics — not a storage or visualization tool itself. Written in Go, it compiles to a single, statically linked binary with no separate runtime to install, making it straightforward to deploy broadly across diverse hosts.

The Four Plugin Types

[[inputs.cpu]]
[[inputs.mem]]

[[processors.rename]]
  [[processors.rename.replace]]
    tag = "host"
    dest = "hostname"

[[aggregators.minmax]]
  period = "30s"

[[outputs.influxdb_v2]]
  urls = ["http://localhost:8086"]

Input plugins collect data from a source (system metrics, a database, a message queue). Processor plugins transform data in-flight — renaming fields, adding tags — before it reaches an output. Aggregator plugins compute statistics (min/max/mean) over a time window, reducing data volume sent downstream. Output plugins send the result to a destination (InfluxDB, Prometheus, Kafka). This modular pipeline lets one agent mix and match sources and destinations without custom glue code per combination.

Built-in System Metrics & the exec Escape Hatch

Built-in plugins like cpu, mem, disk, net read host-level metrics directly from the OS with minimal configuration. When no dedicated plugin exists for a niche source, the exec input plugin runs an arbitrary script and parses its output as metric data — a flexible fallback for custom collection needs.

Keep your own version of these notes — editable, searchable, and organised by your stack.

Start free