datadog

package
v1.18.3 Latest Latest
Warning

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

Go to latest
Published: May 20, 2021 License: MIT Imports: 11 Imported by: 186

README

Datadog Output Plugin

This plugin writes to the Datadog Metrics API and requires an apikey which can be obtained here for the account.

Configuration
[[outputs.datadog]]
  ## Datadog API key
  apikey = "my-secret-key"

  ## Connection timeout.
  # timeout = "5s"

  ## Write URL override; useful for debugging.
  # url = "https://app.datadoghq.com/api/v1/series"
Metrics

Datadog metric names are formed by joining the Telegraf metric name and the field key with a . character.

Field values are converted to floating point numbers. Strings and floats that cannot be sent over JSON, namely NaN and Inf, are ignored.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Datadog

type Datadog struct {
	Apikey  string          `toml:"apikey"`
	Timeout config.Duration `toml:"timeout"`
	URL     string          `toml:"url"`
	Log     telegraf.Logger `toml:"-"`
	// contains filtered or unexported fields
}

func (*Datadog) Close

func (d *Datadog) Close() error

func (*Datadog) Connect

func (d *Datadog) Connect() error

func (*Datadog) Description

func (d *Datadog) Description() string

func (*Datadog) SampleConfig

func (d *Datadog) SampleConfig() string

func (*Datadog) Write

func (d *Datadog) Write(metrics []telegraf.Metric) error

type Metric

type Metric struct {
	Metric string   `json:"metric"`
	Points [1]Point `json:"points"`
	Host   string   `json:"host"`
	Tags   []string `json:"tags,omitempty"`
}

type Point

type Point [2]float64

type TimeSeries

type TimeSeries struct {
	Series []*Metric `json:"series"`
}

Jump to

Keyboard shortcuts

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