telegraf/plugins/aggregators/basicstats
Daniel Nelson 54e61aa78a
Use FieldList in basicstats to improve performance (#4741)
2018-09-26 19:08:46 -07:00
..
README.md Add sum stat to basicstats aggregator (#3797) 2018-03-05 15:26:31 -08:00
basicstats.go Use FieldList in basicstats to improve performance (#4741) 2018-09-26 19:08:46 -07:00
basicstats_test.go Fix minmax and basicstats aggregators to use uint64 (#4294) 2018-06-29 19:07:08 -07:00

README.md

BasicStats Aggregator Plugin

The BasicStats aggregator plugin give us count,max,min,mean,sum,s2(variance), stdev for a set of values, emitting the aggregate every period seconds.

Configuration:

# 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
    • If not specified, then count, min, max, mean, stdev, and s2 are aggregated and pushed as fields. sum is not aggregated by default to maintain backwards compatibility.
    • If empty array, no stats are aggregated

Measurements & Fields:

  • measurement1
    • field1_count
    • field1_max
    • field1_min
    • field1_mean
    • field1_sum
    • field1_s2 (variance)
    • field1_stdev (standard deviation)

Tags:

No tags are applied by this aggregator.

Example Output:

$ telegraf --config telegraf.conf --quiet
system,host=tars load1=1 1475583980000000000
system,host=tars load1=1 1475583990000000000
system,host=tars load1_count=2,load1_max=1,load1_min=1,load1_mean=1,load1_sum=2,load1_s2=0,load1_stdev=0 1475584010000000000
system,host=tars load1=1 1475584020000000000
system,host=tars load1=3 1475584030000000000
system,host=tars load1_count=2,load1_max=3,load1_min=1,load1_mean=2,load1_sum=4,load1_s2=2,load1_stdev=1.414162 1475584010000000000