---
title: Telegraf Aggregator Plugins
description: Telegraf aggregator plugins aggregate data across multiple metrics.
url: https://docs.influxdata.com/telegraf/v1/aggregator-plugins/
estimated_tokens: 2159
product: Telegraf
version: v1
---

# Telegraf Aggregator Plugins

Telegraf aggregator plugins aggregate data across multiple metrics. Aggregator plugins create aggregate metrics–for example, by implementing statistical functions such as mean, min, and max.

### Basic Statistics

Plugin ID: `aggregators.basicstats`  
Telegraf v1.5.0+

This plugin computes basic statistics such as counts, differences, minima, maxima, mean values, non-negative differences etc. for a set of metrics and emits these statistical values every `period`.

[View](/telegraf/v1/aggregator-plugins/basicstats/)

### Derivative

Plugin ID: `aggregators.derivative`  
Telegraf v1.18.0+

This plugin computes the derivative for all fields of the aggregated metrics.

[View](/telegraf/v1/aggregator-plugins/derivative/)

### Final

Plugin ID: `aggregators.final`  
Telegraf v1.11.0+

This plugin emits the last metric of a contiguous series, defined as a series which receives updates within the time period in `series_timeout`. The contiguous series may be longer than the time interval defined by `period`. When a series has not been updated within the `series_timeout`, the last metric is emitted.

Alternatively, the plugin emits the last metric in the `period` for the `periodic` output strategy.

This is useful for getting the final value for data sources that produce discrete time series such as procstat, cgroup, kubernetes etc. or to downsample metrics collected at a higher frequency.

All emited metrics do have fields with `_final` appended to the field-name by default.

[View](/telegraf/v1/aggregator-plugins/final/)

### Histogram

Plugin ID: `aggregators.histogram`  
Telegraf v1.4.0+

This plugin creates histograms containing the counts of field values within the configured range. The histogram metric is emitted every `period`.

In `cumulative` mode, values added to a bucket are also added to the consecutive buckets in the distribution creating a [cumulative histogram](https://en.wikipedia.org/wiki/Histogram#/media/File:Cumulative_vs_normal_histogram.svg).

By default bucket counts are not reset between periods and will be non-strictly increasing while Telegraf is running. This behavior can be by setting the `reset` parameter.

[View](/telegraf/v1/aggregator-plugins/histogram/)

### Merge

Plugin ID: `aggregators.merge`  
Telegraf v1.13.0+

This plugin merges metrics of the same series and timestamp into new metrics with the super-set of fields. A series here is defined by the metric name and the tag key-value set.

Use this plugin when fields are split over multiple metrics, with the same measurement, tag set and timestamp.

[View](/telegraf/v1/aggregator-plugins/merge/)

### Minimum-Maximum

Plugin ID: `aggregators.minmax`  
Telegraf v1.1.0+

This plugin aggregates the minimum and maximum values of each field it sees, emitting the aggrate every `period` seconds with field names suffixed by `_min` and `_max` respectively.

[View](/telegraf/v1/aggregator-plugins/minmax/)

### Quantile

Plugin ID: `aggregators.quantile`  
Telegraf v1.18.0+

This plugin aggregates each numeric field per metric into the specified quantiles and emits the quantiles every `period`. Different aggregation algorithms are supported with varying accuracy and limitations.

[View](/telegraf/v1/aggregator-plugins/quantile/)

### Starlark

Plugin ID: `aggregators.starlark`  
Telegraf v1.21.0+

This plugin allows to implement a custom aggregator plugin via a [Starlark](https://github.com/google/starlark-go) script.

The Starlark language is a dialect of Python and will be familiar to those who have experience with the Python language. However, there are major differences. Existing Python code is unlikely to work unmodified.

The execution environment is sandboxed, and it is not possible to access the local filesystem or perfoming network operations. This is by design of the Starlark language as a configuration language.

The Starlark script used by this plugin needs to be composed of the three methods defining an aggreagtor named `add`, `push` and `reset`.

The `add` method is called as soon as a new metric is added to the plugin the metrics to the aggregator. After `period`, the `push` method is called to output the resulting metrics and finally the aggregation is reset by using the `reset` method of the Starlark script.

The Starlark functions might use the global function `state` to keep aggregation information such as added metrics etc.

More details on the syntax and available functions can be found in the [Starlark specification](https://github.com/google/starlark-go/blob/d1966c6b9fcd/doc/spec.md).

[View](/telegraf/v1/aggregator-plugins/starlark/)

### Value Counter

Plugin ID: `aggregators.valuecounter`  
Telegraf v1.8.0+

This plugin counts the occurrence of unique values in fields and emits the counter once every `period` with the field-names being suffixed by the unique value converted to `string`.

The fields to be counted must be configured using the `fields` setting, otherwise no field will be counted and no metric is emitted.

This plugin is useful to e.g. count the occurrances of HTTP status codes or other categorical values in the defined `period`.

Counting fields with a high number of potential values may produce a significant amounts of new fields and results in an increased memory usage. Take care to only count fields with a limited set of values.

[View](/telegraf/v1/aggregator-plugins/valuecounter/)
