-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- fully document aggregator and processor plugins - improve readme.md closes #1989
- Loading branch information
Showing
4 changed files
with
237 additions
and
115 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# Telegraf Aggregator & Processor Plugins | ||
|
||
As of release 1.1.0, Telegraf has the concept of Aggregator and Processor Plugins. | ||
|
||
These plugins sit in-between Input & Output plugins, aggregating and processing | ||
metrics as they pass through Telegraf: | ||
|
||
``` | ||
┌───────────┐ | ||
│ │ | ||
│ CPU │───┐ | ||
│ │ │ | ||
└───────────┘ │ | ||
│ | ||
┌───────────┐ │ ┌───────────┐ | ||
│ │ │ │ │ | ||
│ Memory │───┤ ┌──▶│ InfluxDB │ | ||
│ │ │ │ │ │ | ||
└───────────┘ │ ┌─────────────┐ ┌─────────────┐ │ └───────────┘ | ||
│ │ │ │Aggregate │ │ | ||
┌───────────┐ │ │Process │ │ - mean │ │ ┌───────────┐ | ||
│ │ │ │ - transform │ │ - quantiles │ │ │ │ | ||
│ MySQL │───┼───▶│ - decorate │────▶│ - min/max │───┼──▶│ File │ | ||
│ │ │ │ - filter │ │ - count │ │ │ │ | ||
└───────────┘ │ │ │ │ │ │ └───────────┘ | ||
│ └─────────────┘ └─────────────┘ │ | ||
┌───────────┐ │ │ ┌───────────┐ | ||
│ │ │ │ │ │ | ||
│ SNMP │───┤ └──▶│ Kafka │ | ||
│ │ │ │ │ | ||
└───────────┘ │ └───────────┘ | ||
│ | ||
┌───────────┐ │ | ||
│ │ │ | ||
│ Docker │───┘ | ||
│ │ | ||
└───────────┘ | ||
``` | ||
|
||
Both Aggregators and Processors analyze metrics as they pass through Telegraf. | ||
|
||
**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`. 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. | ||
|
||
**NOTE** That since aggregators only aggregate metrics within their period, that | ||
historical data is not supported. In other words, if your metric timestamp is more | ||
than `now() - period` in the past, it will not be aggregated. If this is a feature | ||
that you need, please comment on this [github issue](https://github.com/influxdata/telegraf/issues/1992) |
Oops, something went wrong.