2022-06-07 07:04:28 +08:00
|
|
|
# Merge Aggregator Plugin
|
2019-09-27 08:09:44 +08:00
|
|
|
|
2024-10-30 22:29:55 +08:00
|
|
|
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.
|
2019-09-27 08:09:44 +08:00
|
|
|
|
|
|
|
|
Use this plugin when fields are split over multiple metrics, with the same
|
2024-10-30 22:29:55 +08:00
|
|
|
measurement, tag set and timestamp.
|
|
|
|
|
|
|
|
|
|
⭐ Telegraf v1.13.0
|
|
|
|
|
💻 all
|
2019-09-27 08:09:44 +08:00
|
|
|
|
2022-10-27 03:58:36 +08:00
|
|
|
## Global configuration options <!-- @/docs/includes/plugin_config.md -->
|
|
|
|
|
|
|
|
|
|
In addition to the plugin-specific configuration settings, plugins support
|
|
|
|
|
additional global and plugin configuration settings. These settings are used to
|
|
|
|
|
modify metrics, tags, and field or create aliases and configure ordering, etc.
|
|
|
|
|
See the [CONFIGURATION.md][CONFIGURATION.md] for more details.
|
|
|
|
|
|
2023-01-12 23:55:21 +08:00
|
|
|
[CONFIGURATION.md]: ../../../docs/CONFIGURATION.md#plugins
|
2022-10-27 03:58:36 +08:00
|
|
|
|
2021-11-25 02:45:12 +08:00
|
|
|
## Configuration
|
2019-09-27 08:09:44 +08:00
|
|
|
|
2022-05-26 00:25:51 +08:00
|
|
|
```toml @sample.conf
|
2022-04-07 04:40:17 +08:00
|
|
|
# Merge metrics into multifield metrics by series key
|
2019-09-27 08:09:44 +08:00
|
|
|
[[aggregators.merge]]
|
2024-05-09 23:07:10 +08:00
|
|
|
## Precision to round the metric timestamp to
|
|
|
|
|
## This is useful for cases where metrics to merge arrive within a small
|
|
|
|
|
## interval and thus vary in timestamp. The timestamp of the resulting metric
|
|
|
|
|
## is also rounded.
|
|
|
|
|
# round_timestamp_to = "1ns"
|
|
|
|
|
|
2020-01-09 02:46:01 +08:00
|
|
|
## If true, the original metric will be dropped by the
|
|
|
|
|
## aggregator and will not get sent to the output plugins.
|
|
|
|
|
drop_original = true
|
2019-09-27 08:09:44 +08:00
|
|
|
```
|
|
|
|
|
|
2021-11-25 02:45:12 +08:00
|
|
|
## Example
|
2019-09-27 08:09:44 +08:00
|
|
|
|
|
|
|
|
```diff
|
|
|
|
|
- cpu,host=localhost usage_time=42 1567562620000000000
|
|
|
|
|
- cpu,host=localhost idle_time=42 1567562620000000000
|
|
|
|
|
+ cpu,host=localhost idle_time=42,usage_time=42 1567562620000000000
|
|
|
|
|
```
|