input

package
v1.31.1 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Plugin

type Plugin struct {
	Files            []string               `toml:"files"`
	DefaultTags      map[string]string      `toml:"default_tag_defs"`
	AdditionalParams map[string]interface{} `toml:"additional_params"`
	Parser           telegraf.Parser        `toml:"-"`
	Log              telegraf.Logger        `toml:"-"`

	// Settings used by test-code
	Path             string `toml:"-"` // start path for relative files
	ExpectedFilename string `toml:"-"` // filename of the expected metrics (default: expected.out)
	UseTypeTag       string `toml:"-"` // if specified use this tag to infer metric type

	// Test-data derived from the files
	Expected              []telegraf.Metric `toml:"-"` // expected metrics
	ExpectedErrors        []string          `toml:"-"` // expected errors
	ShouldIgnoreTimestamp bool              `toml:"-"` // flag indicating if the expected metrics do have timestamps
	// contains filtered or unexported fields
}

Example struct should be named the same as the Plugin

func (*Plugin) Gather

func (p *Plugin) Gather(acc telegraf.Accumulator) error

func (*Plugin) Init

func (p *Plugin) Init() error

func (*Plugin) SampleConfig

func (*Plugin) SampleConfig() string

func (*Plugin) SetParser

func (p *Plugin) SetParser(parser telegraf.Parser)

Jump to

Keyboard shortcuts

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