Documentation ¶
Index ¶
- Constants
- Variables
- type Config
- type Parser
- func (p *Parser) ApplyTemplate(line string) (string, map[string]string, string, error)
- func (p *Parser) Init() error
- func (p *Parser) InitFromConfig(config *parsers.Config) error
- func (p *Parser) Parse(buf []byte) ([]telegraf.Metric, error)
- func (p *Parser) ParseLine(line string) (telegraf.Metric, error)
- func (p *Parser) SetDefaultTags(tags map[string]string)
Constants ¶
View Source
const ( // DefaultSeparator is the default join character to use when joining multiple // measurement parts in a template. DefaultSeparator = "." )
Variables ¶
View Source
var ( MinDate = time.Date(1901, 12, 13, 0, 0, 0, 0, time.UTC) MaxDate = time.Date(2038, 1, 19, 0, 0, 0, 0, time.UTC) )
Minimum and maximum supported dates for timestamps.
Functions ¶
This section is empty.
Types ¶
type Parser ¶ added in v1.24.0
type Parser struct { Separator string `toml:"separator"` Templates []string `toml:"templates"` DefaultTags map[string]string ` toml:"-"` // contains filtered or unexported fields }
func (*Parser) ApplyTemplate ¶ added in v1.24.0
ApplyTemplate extracts the template fields from the given line and returns the measurement name and tags.
func (*Parser) InitFromConfig ¶ added in v1.24.0
func (*Parser) SetDefaultTags ¶ added in v1.24.0
Click to show internal directories.
Click to hide internal directories.