telegraf/plugins/outputs/datadog
Paweł Żak 39d6b1d5cb
chore: Fix linter findings for errorlint (part3) (#12704)
Co-authored-by: Pawel Zak <Pawel Zak>
2023-02-22 13:38:16 +01:00
..
README.md feat(tools/readme_linter): Check for global configuration section (#12426) 2023-01-12 16:55:21 +01:00
datadog.go chore: Fix linter findings for errorlint (part3) (#12704) 2023-02-22 13:38:16 +01:00
datadog_test.go fix(output.datadog): log response in case of non 2XX response from API (#12201) 2022-11-21 21:54:24 +01:00
sample.conf docs: Sync sample.conf for recent features (#11348) 2022-06-22 08:01:56 -05:00

README.md

Datadog Output Plugin

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

Global configuration options

In addition to the plugin-specific configuration settings, plugins support additional global and plugin configuration settings. These settings are used to modify metrics, tags, and field or create aliases and configure ordering, etc. See the CONFIGURATION.md for more details.

Configuration

# Configuration for DataDog API to send metrics to.
[[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"

  ## Set http_proxy
  # use_system_proxy = false
  # http_proxy_url = "http://localhost:8888"

  ## Override the default (none) compression used to send data.
  ## Supports: "zlib", "none"
  # compression = "none"

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.

We do not send Rate types. Counts are sent as count, with an interval hard-coded to 1. Note that this behavior does not play super-well if running simultaneously with current Datadog agents; they will attempt to change to Rate with interval=10. We prefer this method, however, as it reflects the raw data more accurately.