47 lines
1.1 KiB
Plaintext
47 lines
1.1 KiB
Plaintext
|
---
|
||
|
layout: docs
|
||
|
page_title: 'Autoscaling Plugins: Datadog'
|
||
|
description: The "datadog" APM plugin queries Datadog for metrics.
|
||
|
---
|
||
|
|
||
|
# Datadog APM Plugin
|
||
|
|
||
|
The `datadog` APM plugin allows using [time series][datadog_timeseries] data
|
||
|
from [Datadog][datadog_homepage] to make scaling decisions.
|
||
|
|
||
|
## Agent Configuration Options
|
||
|
|
||
|
```hcl
|
||
|
apm "datadog" {
|
||
|
driver = "datadog"
|
||
|
|
||
|
config = {
|
||
|
dd_api_key = "<api key>"
|
||
|
dd_app_key = "<app key>"
|
||
|
}
|
||
|
}
|
||
|
```
|
||
|
|
||
|
- `dd_api_key` `(string: <required>)` - The Datadog API key to use for
|
||
|
authentication.
|
||
|
|
||
|
- `dd_app_key` `(string: <required>)` - The Datadog application key to use for
|
||
|
authentication.
|
||
|
|
||
|
The Datadog plugin can also read its configuration options via environment
|
||
|
variables. The accepted keys are `DD_API_KEY` and `DD_APP_KEY`. The agent
|
||
|
configuration parameters take precedence over the environment variables.
|
||
|
|
||
|
## Policy Configuration Options
|
||
|
|
||
|
```hcl
|
||
|
check {
|
||
|
source = "datadog"
|
||
|
query = "avg:proxy.backend.response.time{proxy-service:web-app}"
|
||
|
# ...
|
||
|
}
|
||
|
```
|
||
|
|
||
|
[datadog_homepage]: https://www.datadoghq.com/
|
||
|
[datadog_timeseries]: https://docs.datadoghq.com/api/v1/metrics/#query-timeseries-points
|