From 2857f07af9c1e94c28466838f8f323f436d5663f Mon Sep 17 00:00:00 2001 From: Daniel Nelson Date: Fri, 1 Feb 2019 12:12:15 -0800 Subject: [PATCH] Add stats option to basicstats sample config --- plugins/aggregators/basicstats/README.md | 8 +------- plugins/aggregators/basicstats/basicstats.go | 4 +++- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/plugins/aggregators/basicstats/README.md b/plugins/aggregators/basicstats/README.md index f5023dfc7..e9318036b 100644 --- a/plugins/aggregators/basicstats/README.md +++ b/plugins/aggregators/basicstats/README.md @@ -8,20 +8,14 @@ emitting the aggregate every `period` seconds. ```toml # Keep the aggregate basicstats of each metric passing through. [[aggregators.basicstats]] - - ## General Aggregator Arguments: - ## The period on which to flush & clear the aggregator. period = "30s" - ## If true, the original metric will be dropped by the ## aggregator and will not get sent to the output plugins. drop_original = false - ## BasicStats Arguments: - ## Configures which basic stats to push as fields - stats = ["count","min","max","mean","stdev","s2","sum"] + # stats = ["count", "min", "max", "mean", "stdev", "s2", "sum"] ``` - stats diff --git a/plugins/aggregators/basicstats/basicstats.go b/plugins/aggregators/basicstats/basicstats.go index c5c7e5d3f..d054f39f0 100644 --- a/plugins/aggregators/basicstats/basicstats.go +++ b/plugins/aggregators/basicstats/basicstats.go @@ -47,12 +47,14 @@ type basicstats struct { } var sampleConfig = ` - ## General Aggregator Arguments: ## The period on which to flush & clear the aggregator. period = "30s" ## If true, the original metric will be dropped by the ## aggregator and will not get sent to the output plugins. drop_original = false + + ## Configures which basic stats to push as fields + # stats = ["count", "min", "max", "mean", "stdev", "s2", "sum"] ` func (m *BasicStats) SampleConfig() string {