Documentation

Transform data with aggregator and processor plugins

In addition to input plugins and output plugins, Telegraf includes aggregator and processor plugins, which are used to aggregate and process metrics as they pass through Telegraf.

Process
- transform
- decorate
- filter

Aggregate
- transform
- decorate
- filter

CPU

Memory

MySQL

SNMP

Docker

InfluxDB

File

Kafka

Processor plugins process metrics as they pass through and immediately emit results based on the values they process. For example, this could be printing all metrics or adding a tag to all metrics that pass through. For a list of processor plugins and links to their detailed configuration options, see processor plugins.

Aggregator plugins, on the other hand, are a bit more complicated. Aggregators are typically for emitting new aggregate metrics, such as a running mean, minimum, maximum, quantiles, or standard deviation. For this reason, all aggregator plugins are configured with a period. The period is the size of the window of metrics that each aggregate represents. In other words, the emitted aggregate metric will be the aggregated value of the past period seconds. Since many users will only care about their aggregates and not every single metric gathered, there is also a drop_original argument, which tells Telegraf to only emit the aggregates and not the original metrics. For a list of aggregator plugins and links to their detailed configuration options, see aggregator plugins.

Behavior of processors and aggregators when used together

When using both aggregator and processor plugins in Telegraf v1.17, processor plugins process data and then pass it to aggregator plugins. After aggregator plugins aggregate the data, they pass it back to processor plugins. This can have unintended consequences, such as executing mathematical operations twice. See influxdata/telegraf#7993.

If using custom processor scripts, they must be idempotent (repeatable, without side-effects). For custom processes that are not idempotent, use namepass or namedrop to avoid issues when aggregated data is processed a second time.


Was this page helpful?

Thank you for your feedback!


The future of Flux

Flux is going into maintenance mode. You can continue using it as you currently are without any changes to your code.

Read more

InfluxDB 3 Core and Enterprise are now in Beta

InfluxDB 3 Core and Enterprise are now available for beta testing, available under MIT or Apache 2 license.

InfluxDB 3 Core is a high-speed, recent-data engine that collects and processes data in real-time, while persisting it to local disk or object storage. InfluxDB 3 Enterprise is a commercial product that builds on Core’s foundation, adding high availability, read replicas, enhanced security, and data compaction for faster queries. A free tier of InfluxDB 3 Enterprise will also be available for at-home, non-commercial use for hobbyists to get the full historical time series database set of capabilities.

For more information, check out: