metricbeat

package
v0.0.0-...-0b4a972 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2019 License: MIT Imports: 14 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(b *beat.Beat, rawConfig *common.Config) (beat.Beater, error)

New creates and returns a new Collectbeat instance.

Types

type Collectbeat

type Collectbeat struct {
	// contains filtered or unexported fields
}

Collectbeat implements the Beater interface.

func (*Collectbeat) Run

func (bt *Collectbeat) Run(b *beat.Beat) error

Run starts the workers for Collectbeat and blocks until Stop is called and the workers complete. Each host associated with a MetricSet is given its own goroutine for fetching data. The ensures that each host is isolated so that a single unresponsive host cannot inadvertently block other hosts within the same Module and MetricSet from collection.

func (*Collectbeat) Stop

func (bt *Collectbeat) Stop()

Stop signals to Collectbeat that it should stop. It closes the "done" channel and closes the publisher client associated with each Module.

Stop should only be called a single time. Calling it more than once may result in undefined behavior.

type Config

type Config struct {
	// Discoverers is a list of discoverer specific configurationd data.
	Discoverers map[string]*common.Config `config:"discovery"`
	// Upper bound on the random startup delay for metricsets (use 0 to disable startup delay).
	MaxStartDelay time.Duration  `config:"max_start_delay"`
	ConfigModules *common.Config `config:"config.modules"`
}

config is the root of the Collecbeat configuration hierarchy.

Jump to

Keyboard shortcuts

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