awscsm

package
v1.247349.0 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JSONParser

type JSONParser struct {
	MetricName  string
	TagKeys     []string
	DefaultTags map[string]string
}

JSONParser is a parser used to parse JSON and store tags associated with the metrics it is parsing.

func (*JSONParser) Parse

func (p *JSONParser) Parse(buf []byte) ([]telegraf.Metric, error)

Parse will parse a JSON object or array and return any error associated with the JSON.

func (*JSONParser) ParseLine

func (p *JSONParser) ParseLine(line string) (telegraf.Metric, error)

ParseLine will parse an individual line of JSON

func (*JSONParser) SetDefaultTags

func (p *JSONParser) SetDefaultTags(tags map[string]string)

SetDefaultTags will add awscsm tag to allow filtering of metrics that are not of awscsm format.

Jump to

Keyboard shortcuts

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