Update readme and changelog
This commit is contained in:
parent
0038205266
commit
78fb879aa7
|
@ -22,6 +22,7 @@
|
||||||
|
|
||||||
#### New Processors
|
#### New Processors
|
||||||
|
|
||||||
|
- [dedup](/plugins/processors/dedup/README.md) - Contributed by @igomura
|
||||||
- [template](/plugins/processors/template/README.md) - Contributed by @RobMalvern
|
- [template](/plugins/processors/template/README.md) - Contributed by @RobMalvern
|
||||||
- [s2_geo](/plugins/processors/s2_geo/README.md) - Contributed by @alespour
|
- [s2_geo](/plugins/processors/s2_geo/README.md) - Contributed by @alespour
|
||||||
|
|
||||||
|
|
|
@ -360,6 +360,7 @@ For documentation on the latest development code see the [documentation index][d
|
||||||
* [clone](/plugins/processors/clone)
|
* [clone](/plugins/processors/clone)
|
||||||
* [converter](/plugins/processors/converter)
|
* [converter](/plugins/processors/converter)
|
||||||
* [date](/plugins/processors/date)
|
* [date](/plugins/processors/date)
|
||||||
|
* [dedup](/plugins/processors/dedup)
|
||||||
* [enum](/plugins/processors/enum)
|
* [enum](/plugins/processors/enum)
|
||||||
* [override](/plugins/processors/override)
|
* [override](/plugins/processors/override)
|
||||||
* [parser](/plugins/processors/parser)
|
* [parser](/plugins/processors/parser)
|
||||||
|
|
|
@ -1,11 +1,6 @@
|
||||||
# Dedup Processor Plugin
|
# Dedup Processor Plugin
|
||||||
|
|
||||||
If a metric sends the same value over successive intervals, suppress sending
|
Filter metrics whose field values are exact repetitions of the previous values.
|
||||||
the same value to the TSD until this many seconds have elapsed. This helps
|
|
||||||
graphs over narrow time ranges still see timeseries with suppressed datapoints.
|
|
||||||
|
|
||||||
This feature can be used to reduce traffic when metric's value does not change over
|
|
||||||
time while maintain proper precision when value gets changed rapidly
|
|
||||||
|
|
||||||
### Configuration
|
### Configuration
|
||||||
|
|
||||||
|
@ -15,3 +10,15 @@ time while maintain proper precision when value gets changed rapidly
|
||||||
dedup_interval = "600s"
|
dedup_interval = "600s"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```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
|
||||||
|
```
|
||||||
|
|
|
@ -24,7 +24,7 @@ func (d *Dedup) SampleConfig() string {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (d *Dedup) Description() string {
|
func (d *Dedup) Description() string {
|
||||||
return "Deduplicate repetitive metrics"
|
return "Drop metrics with repeating field values"
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove single item from slice
|
// Remove single item from slice
|
||||||
|
@ -73,7 +73,7 @@ func (d *Dedup) Apply(metrics ...telegraf.Metric) []telegraf.Metric {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
// For each filed compare value with the cached one
|
// For each field compare value with the cached one
|
||||||
changed := false
|
changed := false
|
||||||
for _, f := range metric.FieldList() {
|
for _, f := range metric.FieldList() {
|
||||||
if value, ok := m.GetField(f.Key); ok && value != f.Value {
|
if value, ok := m.GetField(f.Key); ok && value != f.Value {
|
||||||
|
|
Loading…
Reference in New Issue