Documentation

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

Derivative

Plugin ID: aggregators.derivative
Telegraf v1.18.0+

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

View

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

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.

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

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

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

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

Starlark

Plugin ID: aggregators.starlark
Telegraf v1.21.0+

This plugin allows to implement a custom aggregator plugin via a Starlark 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.

View

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

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

New in InfluxDB 3.4

Key enhancements in InfluxDB 3.4 and the InfluxDB 3 Explorer 1.2.

See the Blog Post

InfluxDB 3.4 is now available for both Core and Enterprise, which introduces offline token generation for use in automated deployments and configurable license type selection that lets you bypass the interactive license prompt. InfluxDB 3 Explorer 1.2 is also available, which includes InfluxDB cache management and other new features.

For more information, check out: