wavefront

package
v1.14.4 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2020 License: MIT Imports: 11 Imported by: 8

README

Wavefront

Wavefront Data Format is metrics are parsed directly into Telegraf metrics. For more information about the Wavefront Data Format see here.

Configuration

There are no additional configuration options for Wavefront Data Format line-protocol.

[[inputs.file]]
  files = ["example"]

  ## Data format to consume.
  ## Each data format has its own unique set of configuration options, read
  ## more about them here:
  ##   https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_INPUT.md
  data_format = "wavefront"

Documentation

Index

Constants

View Source
const MAX_BUFFER_SIZE = 2

Variables

View Source
var (
	ErrEOF              = errors.New("EOF")
	ErrInvalidTimestamp = errors.New("Invalid timestamp")
)

Functions

This section is empty.

Types

type ElementParser

type ElementParser interface {
	// contains filtered or unexported methods
}

Interface for parsing line elements.

func NewWavefrontElements

func NewWavefrontElements() []ElementParser

Returns a slice of ElementParser's for the Graphite format

type LiteralParser

type LiteralParser struct {
	// contains filtered or unexported fields
}

type LoopedParser

type LoopedParser struct {
	// contains filtered or unexported fields
}

type NameParser

type NameParser struct{}

type Point

type Point struct {
	Name      string
	Value     string
	Timestamp int64
	Source    string
	Tags      map[string]string
}

type PointParser

type PointParser struct {
	Elements []ElementParser
	// contains filtered or unexported fields
}

PointParser is a thread-unsafe parser and must be kept in a pool.

func NewPointParser

func NewPointParser(parent *WavefrontParser) *PointParser

func (*PointParser) Parse

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

type PointScanner

type PointScanner struct {
	// contains filtered or unexported fields
}

Lexical Point Scanner

func NewScanner

func NewScanner(r io.Reader) *PointScanner

func (*PointScanner) Scan

func (s *PointScanner) Scan() (Token, string)

Scan returns the next token and literal value.

type TagParser

type TagParser struct{}

type TimestampParser

type TimestampParser struct {
	// contains filtered or unexported fields
}

type Token

type Token int
const (
	// Special tokens
	ILLEGAL Token = iota
	EOF
	WS

	LETTER // metric name, source/point tags
	NUMBER
	MINUS_SIGN
	UNDERSCORE
	DOT
	SLASH
	BACKSLASH
	COMMA
	DELTA

	// Misc characters
	QUOTES
	EQUALS
	NEWLINE
)

type ValueParser

type ValueParser struct{}

type WavefrontParser

type WavefrontParser struct {
	// contains filtered or unexported fields
}

func NewWavefrontParser

func NewWavefrontParser(defaultTags map[string]string) *WavefrontParser

func (*WavefrontParser) Parse

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

func (*WavefrontParser) ParseLine

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

func (*WavefrontParser) SetDefaultTags

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

type WhiteSpaceParser

type WhiteSpaceParser struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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