2020-03-18 06:53:03 +08:00
|
|
|
# Dedup Processor Plugin
|
|
|
|
|
|
2020-03-18 09:39:08 +08:00
|
|
|
Filter metrics whose field values are exact repetitions of the previous values.
|
2023-10-13 05:07:13 +08:00
|
|
|
This plugin will store its state between runs if the `statefile` option in the
|
|
|
|
|
agent config section is set.
|
2020-03-18 06:53:03 +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:47:11 +08:00
|
|
|
## Configuration
|
2020-03-18 06:53:03 +08:00
|
|
|
|
2022-05-25 22:59:41 +08:00
|
|
|
```toml @sample.conf
|
2022-04-07 04:49:41 +08:00
|
|
|
# Filter metrics with repeating field values
|
2020-03-18 06:53:03 +08:00
|
|
|
[[processors.dedup]]
|
|
|
|
|
## Maximum time to suppress output
|
|
|
|
|
dedup_interval = "600s"
|
|
|
|
|
```
|
|
|
|
|
|
2021-11-25 02:47:11 +08:00
|
|
|
## Example
|
2020-03-18 09:39:08 +08:00
|
|
|
|
|
|
|
|
```diff
|
|
|
|
|
- cpu,cpu=cpu0 time_idle=42i,time_guest=1i
|
|
|
|
|
- cpu,cpu=cpu0 time_idle=42i,time_guest=2i
|
|
|
|
|
- cpu,cpu=cpu0 time_idle=42i,time_guest=2i
|
|
|
|
|
- cpu,cpu=cpu0 time_idle=44i,time_guest=2i
|
|
|
|
|
- cpu,cpu=cpu0 time_idle=44i,time_guest=2i
|
|
|
|
|
+ cpu,cpu=cpu0 time_idle=42i,time_guest=1i
|
|
|
|
|
+ cpu,cpu=cpu0 time_idle=42i,time_guest=2i
|
|
|
|
|
+ cpu,cpu=cpu0 time_idle=44i,time_guest=2i
|
|
|
|
|
```
|