plugins

package
v2.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AgentConfig = `` /* 2399-byte string literal not displayed */

AgentConfig contains the default agent config.

Functions

This section is empty.

Types

type Config

type Config interface {
	// TOML encodes to toml string
	TOML() string
	// UnmarshalTOML decodes the parsed data to the object
	UnmarshalTOML(data interface{}) error
	// Type is the plugin type
	Type() Type
	// PluginName is the string value of telegraf plugin package name.
	PluginName() string
}

Config interface for all plugins.

type Plugin

type Plugin struct {
	Type        string `json:"type,omitempty"`        // Type of the plugin.
	Name        string `json:"name,omitempty"`        // Name of the plugin.
	Description string `json:"description,omitempty"` // Description of the plugin.
	Config      string `json:"config,omitempty"`      // Config contains the toml config of the plugin.
}

Plugin defines a Telegraf plugin.

func GetPlugin

func GetPlugin(t, name string) (*Plugin, bool)

GetPlugin returns the plugin's sample config, if available.

type TelegrafPlugins

type TelegrafPlugins struct {
	Version string   `json:"version,omitempty"` // Version of telegraf plugins are for.
	OS      string   `json:"os,omitempty"`      // OS the plugins apply to.
	Plugins []Plugin `json:"plugins,omitempty"` // Plugins this version of telegraf supports.
}

TelegrafPlugins defines a Telegraf version's collection of plugins.

func AvailableAggregators

func AvailableAggregators() (*TelegrafPlugins, error)

AvailableAggregators returns the base list of available aggregator plugins.

func AvailableBundles

func AvailableBundles() (*TelegrafPlugins, error)

AvailableBundles returns the base list of available bundled plugins.

func AvailableInputs

func AvailableInputs() (*TelegrafPlugins, error)

AvailableInputs returns the base list of available input plugins.

func AvailableOutputs

func AvailableOutputs() (*TelegrafPlugins, error)

AvailableOutputs returns the base list of available output plugins.

func AvailablePlugins

func AvailablePlugins() (*TelegrafPlugins, error)

AvailablePlugins returns the base list of available plugins.

func AvailableProcessors

func AvailableProcessors() (*TelegrafPlugins, error)

AvailableProcessors returns the base list of available processor plugins.

func ListAvailablePlugins

func ListAvailablePlugins(t string) (*TelegrafPlugins, error)

ListAvailablePlugins lists available plugins based on type.

type Type

type Type string

Type is a telegraf plugin type.

const (
	Input      Type = "input"      // Input is an input plugin.
	Output     Type = "output"     // Output is an output plugin.
	Processor  Type = "processor"  // Processor is a processor plugin.
	Aggregator Type = "aggregator" // Aggregator is an aggregator plugin.
)

available types.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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