Documentation ¶
Index ¶
- func GetTime(t ...time.Time) time.Time
- type BaseEmitter
- func (b *BaseEmitter) Add(measurement string, fields map[string]interface{}, tags map[string]string, ...)
- func (b *BaseEmitter) AddError(err error)
- func (b *BaseEmitter) AddTag(key string, val string)
- func (b *BaseEmitter) AddTags(tags map[string]string)
- func (b *BaseEmitter) ExcludeData(names []string)
- func (b *BaseEmitter) ExcludeDatum(name string)
- func (b *BaseEmitter) FilterTags(key string, value string) (include bool)
- func (b *BaseEmitter) IncludeEvent(name string)
- func (b *BaseEmitter) IncludeEvents(names []string)
- func (b *BaseEmitter) Included(name string) (included bool)
- func (b *BaseEmitter) IsExcluded(name string) (excluded bool)
- func (b *BaseEmitter) OmitTag(tag string)
- func (b *BaseEmitter) OmitTags(tags []string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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 (*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