agent

package
v0.0.0-...-dd061d4 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2024 License: MIT Imports: 16 Imported by: 0

README

Agent

For a complete list of configuration options and details about the agent, please see the configuration document's agent section.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

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(cfg *config.Config) *Agent

NewAgent returns an Agent for the given Config.

func (*Agent) Once

func (a *Agent) Once(ctx context.Context, wait time.Duration) error

Once runs the full agent for a single gather.

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, wait time.Duration) error

Test runs the inputs, processors and aggregators for a single gather and writes the metrics to stdout.

type MetricMaker

type MetricMaker interface {
	LogName() string
	MakeMetric(m telegraf.Metric) telegraf.Metric
	Log() telegraf.Logger
}

Jump to

Keyboard shortcuts

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