Skip to main content

Integrate with Datadog

This topic provides a sample configuration to set up Datadog to scrape performance metrics for your Polaris environment.

Prerequisites

  • Datadog environment. Configure Datadog to use a single Datadog Agent for scraping metrics from the Metrics export API. You can reuse an existing Agent, install the Agent on an EC2 instance, or run the Agent somewhere else in your infrastructure. Refer to the Datadog documentation for instructions on how to configure the Agent to report to your Datadog account.
  • Datadog's OpenMetrics check. Refer to the OpenMetrics setup instructions to configure the OpenMetrics check for your Datadog Agent.
  • A Polaris API key with the AccessMetrics permission. See Authenticate with API keys to obtain an API key and assign service account permissions. For more information on permissions, visit Permissions reference.

Instructions

The following is an example configuration to ingest metrics into Datadog using the OpenMetrics check. Update the config file in ${datadog-agent}/conf.d/openmetrics.d/conf.yaml to match the example configuration. For more advanced use cases, refer to the Datadog documentation.

instances:
# The endpoint to collect metrics about Polaris. Replace ORGANIZATION_NAME with the name of your organization.
- openmetrics_endpoint: https://ORGANIZATION_NAME.api.imply.io/v1/metrics/export

# The namespace added to all metrics. This can be changed.
namespace: imply

auth_type: basic
username: apikey
# Replace POLARIS_API_KEY with your API key. Ensure that the API key has the AccessMetrics permission.
password: POLARIS_API_KEY

# Ask Datadog to ingest all metrics reported by Polaris.
# You may change this to ingest just a subset of metrics if you are not interested in the entire set.
metrics: [.*]

# Polaris updates metrics every minute, so this interval is set to 60 seconds.
min_collection_interval: 60

Optional: You can test this integration locally with the following Docker command. Before running the command, create a file named conf.yaml in your working directory and copy the configuration into that file. Replace DD_API_KEY with your Datadog API key.

docker run -d --name dd-agent \
-v /var/run/docker.sock:/var/run/docker.sock:ro \
-v /proc/:/host/proc/:ro \
-v /sys/fs/cgroup/:/host/sys/fs/cgroup:ro \
-v ${PWD}/conf.yaml/:/etc/datadog-agent/conf.d/openmetrics.d/conf.yaml \
-e DD_API_KEY=YOUR_DD_API_KEY \
gcr.io/datadoghq/agent:7

Learn more

See the following topics for more information: