baseemitter

package
v3.3.0-beta5+incompatible Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2018 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetTime

func GetTime(t ...time.Time) time.Time

GetTime returns the first timestamp from an array of timestamps

Types

type BaseEmitter

type BaseEmitter struct {
	Output types.Output
	Logger log.FieldLogger
	// contains filtered or unexported fields
}

BaseEmitter immediately converts a telegraf measurement into datapoints and sends them through Output

func NewEmitter

func NewEmitter() *BaseEmitter

NewEmitter returns a new BaseEmitter

func (*BaseEmitter) Add

func (b *BaseEmitter) Add(measurement string, fields map[string]interface{},
	tags map[string]string, metricType datapoint.MetricType,
	originalMetricType string, t ...time.Time)

Add parses measurements from telegraf and emits them through Output

func (*BaseEmitter) AddError

func (b *BaseEmitter) AddError(err error)

AddError handles errors reported to a telegraf accumulator

func (*BaseEmitter) AddTag

func (b *BaseEmitter) AddTag(key string, val string)

AddTag adds a key/value pair to all measurement tags. If a key conflicts the key value pair in AddTag will override the original key on the measurement

func (*BaseEmitter) AddTags

func (b *BaseEmitter) AddTags(tags map[string]string)

AddTags adds a map of key value pairs to all measurement tags. If a key conflicts the key value pair in AddTags will override the original key on the measurement.

func (*BaseEmitter) ExcludeData

func (b *BaseEmitter) ExcludeData(names []string)

ExcludeData adds a list of names the list of metrics and events to exclude

func (*BaseEmitter) ExcludeDatum

func (b *BaseEmitter) ExcludeDatum(name string)

ExcludeDatum adds a name to the list of metrics and events to exclude

func (*BaseEmitter) FilterTags

func (b *BaseEmitter) FilterTags(key string, value string) (include bool)

FilterTags - filter function for util.CloneAndFilterStringMapWithFunc() it returns true if the supplied key is not in the omittedTags map

func (*BaseEmitter) IncludeEvent

func (b *BaseEmitter) IncludeEvent(name string)

IncludeEvent a thread safe function for registering an event name to include during emission. We disable all events by default because Telegraf has some junk events.

func (*BaseEmitter) IncludeEvents

func (b *BaseEmitter) IncludeEvents(names []string)

IncludeEvents a thread safe function for registering a list of event names to include during emission. We disable all events by default because Telegraf has some junk events.

func (*BaseEmitter) Included

func (b *BaseEmitter) Included(name string) (included bool)

Included - A thread safe function for checking if events should be included during emission. We disable all events by default because Telegraf has some junk events.

func (*BaseEmitter) IsExcluded

func (b *BaseEmitter) IsExcluded(name string) (excluded bool)

IsExcluded - A thread safe function for checking if events or metrics should be excluded from emission

func (*BaseEmitter) OmitTag

func (b *BaseEmitter) OmitTag(tag string)

OmitTag adds a tag to the list of tags to remove from measurements

func (*BaseEmitter) OmitTags

func (b *BaseEmitter) OmitTags(tags []string)

OmitTags adds a list of tags the list of tags to remove from measurements

Jump to

Keyboard shortcuts

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