agent

package
v1.0.0-...-47f3d97 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2019 License: MIT Imports: 13 Imported by: 0

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) 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