Telegraf aggregator and processor plugins
This page documents an earlier version of Telegraf. Telegraf v1.26 is the latest stable version.
Besides the input plugins and output plugins, Telegraf includes aggregator and processor plugins, which are used to aggregate and process metrics as they pass through Telegraf.
- filter] Aggregate[Aggregate
- filter] CPU --> Process Memory --> Process MySQL --> Process SNMP --> Process Docker --> Process Process --> Aggregate Aggregate --> InfluxDB Aggregate --> File Aggregate --> Kafka style Process text-align:left style Aggregate text-align:left
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.
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 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
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.
Aggregator plugins do not support historical data
Since aggregator plugins only aggregate metrics within their periods,
historical data is not supported.
In other words, if your metric timestamp is more
now() - period in the past, it is not aggregated.
For more information, see influxdata/telegraf#1992.
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!
Support and feedback
Thank you for being part of our community! We welcome and encourage your feedback and bug reports for Telegraf and this documentation. To find support, use the following resources:
InfluxDB Cloud customers can contact InfluxData Support.