Datadog Integration
Connect Datadog to bring your Datadog usage, spend and configuration into Cloud ex Machina, next to your cloud infrastructure costs. Cloud ex Machina uses the configuration to recommend optimizations.
| Data | Datadog API | Scopes on the application key |
|---|---|---|
| Usage per product (hosts, logs, APM) | Usage Metering | usage_read |
| Estimated, projected and historical cost (up to 15 months) | Usage Metering, cost endpoints | usage_read, billing_read |
| Cloud cost data and usage notification settings | Cloud Cost Management, Usage Metering | cloud_cost_management_read, usage_notifications_read |
| Hosts, metrics and metric volumes | Infrastructure, Metrics | hosts_read, metrics_read, timeseries_query |
| Monitors, dashboards, SLOs and synthetic tests | Monitors, Dashboards, SLOs, Synthetics | monitors_read, dashboards_read, slos_read, synthetics_read |
| Log indexes, pipelines and retention | Logs configuration | logs_read_config |
| APM services, retention filters and ingestion | APM | apm_service_catalog_read, apm_retention_filter_read, apm_service_ingest_read |
| RUM applications and retention filters | RUM | rum_apps_read, rum_retention_filters_read |
| Security detection rules | Security Monitoring | security_monitoring_rules_read |
| Users, roles and teams | Access management | user_access_read, teams_read |
| Cloud and other integrations | Integrations | integrations_read, aws_configuration_read, azure_configuration_read, gcp_configuration_read |
Cloud ex Machina asks for read scopes only. It cannot change your Datadog configuration. It does not read your log contents, your traces or your API key values.
Prerequisites
- Cloud ex Machina Admin access.
- In Datadog, the Datadog Admin role, or a custom role that can manage API keys and application keys.
- If you have more than one Datadog organization, use keys from the parent organization. Datadog gives cost data only to the parent organization. A key from a child organization gives usage data only.
Step 1: Find your Datadog site
Look at the URL in your browser when you are signed in to Datadog:
| Your Datadog URL | Site to select |
|---|---|
app.datadoghq.com | datadoghq.com |
us3.datadoghq.com | us3.datadoghq.com |
us5.datadoghq.com | us5.datadoghq.com |
app.datadoghq.eu | datadoghq.eu |
app.ddog-gov.com | ddog-gov.com |
ap1.datadoghq.com | ap1.datadoghq.com |
Step 2: Create an API key
- In Datadog, go to Organization Settings > API Keys.
- Click New Key.
- Name the key
Cloud ex Machina. - Copy the key.
Step 3: Create an application key with read-only scopes
An application key without scopes has all the permissions of the user who creates it. Set the scopes below. Do not set other scopes.
-
In Datadog, go to Organization Settings > Application Keys.
-
Click New Key and name it
Cloud ex Machina. -
Open the key and click Edit in the Scopes section.
-
Select each scope in this list. Do not select other scopes.
usage_read, billing_read, cloud_cost_management_read, usage_notifications_read,hosts_read, metrics_read, timeseries_query,monitors_read, dashboards_read, slos_read, synthetics_read,logs_read_config,apm_service_catalog_read, apm_retention_filter_read, apm_service_ingest_read,rum_apps_read, rum_retention_filters_read,security_monitoring_rules_read,user_access_read, teams_read,integrations_read, aws_configuration_read, azure_configuration_read, gcp_configuration_read -
Save, then copy the key. Datadog shows the key only once.
Step 4: Add the connection in Cloud ex Machina
- In the sidebar, click Integrations.
- Find Datadog and click Sign in. If Datadog already has a connection, the button is Add connection.
- Fill in:
- Site Parameter: the site from Step 1.
- API Key: the key from Step 2.
- Application Key: the key from Step 3.
- Submit the form. Cloud ex Machina checks the API key with Datadog, then saves the connection.
What happens after connecting
To remove the connection, click the connection row under the Datadog card, then click Disconnect. Then delete the two keys in Datadog.
Next Steps
- See all available integrations in the Integrations Overview.