minmax

package
v1.25.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 27, 2023 License: MIT Imports: 3 Imported by: 14

README

MinMax Aggregator Plugin

The minmax aggregator plugin aggregates min & max values of each field it sees, emitting the aggrate every period seconds.

Global configuration options

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 for more details.

Configuration

# Keep the aggregate min/max of each metric passing through.
[[aggregators.minmax]]
  ## 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

Measurements & Fields

  • measurement1
    • field1_max
    • field1_min

Tags

No tags are applied by this aggregator.

Example Output

$ telegraf --config telegraf.conf --quiet
system,host=tars load1=1.72 1475583980000000000
system,host=tars load1=1.6 1475583990000000000
system,host=tars load1=1.66 1475584000000000000
system,host=tars load1=1.63 1475584010000000000
system,host=tars load1_max=1.72,load1_min=1.6 1475584010000000000
system,host=tars load1=1.46 1475584020000000000
system,host=tars load1=1.39 1475584030000000000
system,host=tars load1=1.41 1475584040000000000
system,host=tars load1_max=1.46,load1_min=1.39 1475584040000000000

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMinMax

func NewMinMax() telegraf.Aggregator

Types

type MinMax

type MinMax struct {
	// contains filtered or unexported fields
}

func (*MinMax) Add

func (m *MinMax) Add(in telegraf.Metric)

func (*MinMax) Push

func (m *MinMax) Push(acc telegraf.Accumulator)

func (*MinMax) Reset

func (m *MinMax) Reset()

func (*MinMax) SampleConfig

func (*MinMax) SampleConfig() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL