opentsdb

package
v1.30.2 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: MIT Imports: 10 Imported by: 0

README

OpenTSDB Telnet Style Put Format Parser Plugin

The OpenTSDB data format parses data in OpenTSDB's Telnet style put API format. There are no additional configuration options for OpenTSDB. The metrics are parsed directly into Telegraf metrics.

For more detail on the format, see:

Configuration

[[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 = "opentsdb"

Example

put sys.cpu.user 1356998400 42.5 host=webserver01 cpu=0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Parser

type Parser struct {
	DefaultTags map[string]string `toml:"-"`
	Log         telegraf.Logger   `toml:"-"`
}

Parser encapsulates a OpenTSDB Parser.

func (*Parser) Parse

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

func (*Parser) ParseLine

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

ParseLine performs OpenTSDB parsing of a single line.

func (*Parser) SetDefaultTags

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

Jump to

Keyboard shortcuts

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