Update datadog output documentation (#7467)

This commit is contained in:
Daniel Nelson 2020-05-06 11:25:21 -07:00 committed by GitHub
parent 0924ad2668
commit 283a16316a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 30 additions and 9 deletions

View File

@ -1,9 +1,30 @@
# Datadog Output Plugin
This plugin writes to the [Datadog Metrics API](http://docs.datadoghq.com/api/#metrics)
and requires an `apikey` which can be obtained [here](https://app.datadoghq.com/account/settings#api)
for the account.
This plugin writes to the [Datadog Metrics API][metrics] and requires an
`apikey` which can be obtained [here][apikey] for the account.
If the point value being sent cannot be converted to a float64, the metric is skipped.
Metrics are grouped by converting any `_` characters to `.` in the Point Name.
### Configuration
```toml
[[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.
[metrics]: https://docs.datadoghq.com/api/v1/metrics/#submit-metrics
[apikey]: https://app.datadoghq.com/account/settings#api

View File

@ -25,13 +25,13 @@ type Datadog struct {
var sampleConfig = `
## Datadog API key
apikey = "my-secret-key" # required.
# The base endpoint URL can optionally be specified but it defaults to:
#url = "https://app.datadoghq.com/api/v1/series"
apikey = "my-secret-key"
## Connection timeout.
# timeout = "5s"
## Write URL override; useful for debugging.
# url = "https://app.datadoghq.com/api/v1/series"
`
type TimeSeries struct {