warp10

package
v1.23.2 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2022 License: MIT Imports: 15 Imported by: 0

README

Warp10 Output Plugin

The warp10 output plugin writes metrics to Warp 10.

Configuration

# Write metrics to Warp 10
[[outputs.warp10]]
  # Prefix to add to the measurement.
  prefix = "telegraf."

  # URL of the Warp 10 server
  warp_url = "http://localhost:8080"

  # Write token to access your app on warp 10
  token = "Token"

  # Warp 10 query timeout
  # timeout = "15s"

  ## Print Warp 10 error body
  # print_error_body = false

  ## Max string error size
  # max_string_error_size = 511

  ## Optional TLS Config
  # tls_ca = "/etc/telegraf/ca.pem"
  # tls_cert = "/etc/telegraf/cert.pem"
  # tls_key = "/etc/telegraf/key.pem"
  ## Use TLS but skip chain & host verification
  # insecure_skip_verify = false

Output Format

Metrics are converted and sent using the Geo Time Series (GTS) input format.

The class name of the reading is produced by combining the value of the prefix option, the measurement name, and the field key. A dot (.) character is used as the joining character.

The GTS form provides support for the Telegraf integer, float, boolean, and string types directly. Unsigned integer fields will be capped to the largest 64-bit integer (2^63-1) in case of overflow.

Timestamps are sent in microsecond precision.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MetricLine

type MetricLine struct {
	Metric    string
	Timestamp int64
	Value     string
	Tags      string
}

MetricLine Warp 10 metrics

type Warp10

type Warp10 struct {
	Prefix             string          `toml:"prefix"`
	WarpURL            string          `toml:"warp_url"`
	Token              string          `toml:"token"`
	Timeout            config.Duration `toml:"timeout"`
	PrintErrorBody     bool            `toml:"print_error_body"`
	MaxStringErrorSize int             `toml:"max_string_error_size"`

	tls.ClientConfig
	Log telegraf.Logger `toml:"-"`
	// contains filtered or unexported fields
}

Warp10 output plugin

func (*Warp10) Close

func (w *Warp10) Close() error

Close close

func (*Warp10) Connect

func (w *Warp10) Connect() error

Connect to warp10

func (*Warp10) GenWarp10Payload

func (w *Warp10) GenWarp10Payload(metrics []telegraf.Metric) string

GenWarp10Payload compute Warp 10 metrics payload

func (*Warp10) HandleError

func (w *Warp10) HandleError(body string, maxStringSize int) string

HandleError read http error body and return a corresponding error

func (*Warp10) Init

func (w *Warp10) Init() error

Init Warp10 struct

func (*Warp10) SampleConfig

func (*Warp10) SampleConfig() string

func (*Warp10) Write

func (w *Warp10) Write(metrics []telegraf.Metric) error

Write metrics to Warp10

Jump to

Keyboard shortcuts

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