emf

package
v1.300001.0 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EMFParser

type EMFParser struct {
	MetricName  string
	DefaultTags map[string]string
}

func (*EMFParser) Parse

func (v *EMFParser) Parse(buf []byte) ([]telegraf.Metric, error)

One byte array can possibly have multiple structured log entries. The separator between multiple structured log entries is newline '\n'. It means that json will be sent in minimized/compact mode without any newline in the json body.

func (*EMFParser) ParseLine

func (v *EMFParser) ParseLine(line string) (telegraf.Metric, error)

One and only one metric is expected. If it is empty string or somehow cannot form one metric, it will return error.

func (*EMFParser) SetDefaultTags

func (v *EMFParser) SetDefaultTags(tags map[string]string)

Jump to

Keyboard shortcuts

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