agent

package
v1.10.4-cortex Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2019 License: MIT Imports: 13 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	NErrors = selfstat.Register("agent", "gather_errors", map[string]string{})
)

Functions

func NewAccumulator

func NewAccumulator(
	maker MetricMaker,
	metrics chan<- telegraf.Metric,
) telegraf.Accumulator

Types

type Agent

type Agent struct {
	Config *config.Config
}

Agent runs a set of plugins.

func NewAgent

func NewAgent(config *config.Config) (*Agent, error)

NewAgent returns an Agent for the given Config.

func (*Agent) Precision

func (a *Agent) Precision() time.Duration

Returns the rounding precision for metrics.

func (*Agent) Run

func (a *Agent) Run(ctx context.Context) error

Run starts and runs the Agent until the context is done.

func (*Agent) Test

func (a *Agent) Test(ctx context.Context) error

Test runs the inputs once and prints the output to stdout in line protocol.

type MetricMaker

type MetricMaker interface {
	Name() string
	MakeMetric(metric telegraf.Metric) telegraf.Metric
}

type Ticker

type Ticker struct {
	C chan time.Time
	// contains filtered or unexported fields
}

func NewTicker

func NewTicker(
	interval time.Duration,
	jitter time.Duration,
) *Ticker

func (*Ticker) Stop

func (t *Ticker) Stop()

Jump to

Keyboard shortcuts

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