config

package
v0.0.0-...-2a2e17e Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2020 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AgentConfig

type AgentConfig struct {
	// Interval at which to gather information
	Interval internal.Duration
	// RoundInterval rounds collection interval to 'interval'.
	//     ie, if Interval=10s then always collect on :00, :10, :20, etc.
	RoundInterval    bool
	Precision        internal.Duration
	FlushInterval    internal.Duration
	CollectionJitter internal.Duration
	FlushJitter      internal.Duration

	MetricBatchSize   int
	MetricBufferLimit int

	// Quiet is the option for running in quiet mode
	Quiet bool `toml:"quiet"`

	LogTarget string `toml:"logtarget"`
	Logfile   string `toml:"logfile"`

	LogfileRotationInterval    internal.Duration `toml:"logfile_rotation_interval"`
	LogfileRotationMaxSize     internal.Size     `toml:"logfile_rotation_max_size"`
	LogfileRotationMaxArchives int               `toml:"logfile_rotation_max_archives"`

	Hostname     string
	OmitHostname bool
}

type Config

type Config struct {
	Tags map[string]string

	Agent   *AgentConfig
	Inputs  []*models.RunningInput
	Outputs []*models.RunningOutput
}

func NewConfig

func NewConfig() *Config

func (*Config) InputNames

func (c *Config) InputNames() []string

func (*Config) ListTags

func (c *Config) ListTags() string

func (*Config) LoadConfig

func (c *Config) LoadConfig(path string) error

func (*Config) LoadDirectory

func (c *Config) LoadDirectory(path string) error

func (*Config) OutputNames

func (c *Config) OutputNames() []string

Jump to

Keyboard shortcuts

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