Skip to main content

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.

DataDatadog APIScopes on the application key
Usage per product (hosts, logs, APM)Usage Meteringusage_read
Estimated, projected and historical cost (up to 15 months)Usage Metering, cost endpointsusage_read, billing_read
Cloud cost data and usage notification settingsCloud Cost Management, Usage Meteringcloud_cost_management_read, usage_notifications_read
Hosts, metrics and metric volumesInfrastructure, Metricshosts_read, metrics_read, timeseries_query
Monitors, dashboards, SLOs and synthetic testsMonitors, Dashboards, SLOs, Syntheticsmonitors_read, dashboards_read, slos_read, synthetics_read
Log indexes, pipelines and retentionLogs configurationlogs_read_config
APM services, retention filters and ingestionAPMapm_service_catalog_read, apm_retention_filter_read, apm_service_ingest_read
RUM applications and retention filtersRUMrum_apps_read, rum_retention_filters_read
Security detection rulesSecurity Monitoringsecurity_monitoring_rules_read
Users, roles and teamsAccess managementuser_access_read, teams_read
Cloud and other integrationsIntegrationsintegrations_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 URLSite to select
app.datadoghq.comdatadoghq.com
us3.datadoghq.comus3.datadoghq.com
us5.datadoghq.comus5.datadoghq.com
app.datadoghq.eudatadoghq.eu
app.ddog-gov.comddog-gov.com
ap1.datadoghq.comap1.datadoghq.com

Step 2: Create an API key​

  1. In Datadog, go to Organization Settings > API Keys.
  2. Click New Key.
  3. Name the key Cloud ex Machina.
  4. Copy the key.

Step 3: Create an application key with read-only scopes​

Scope the key

An application key without scopes has all the permissions of the user who creates it. Set the scopes below. Do not set other scopes.

  1. In Datadog, go to Organization Settings > Application Keys.

  2. Click New Key and name it Cloud ex Machina.

  3. Open the key and click Edit in the Scopes section.

  4. 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
  5. Save, then copy the key. Datadog shows the key only once.

Step 4: Add the connection in Cloud ex Machina​

  1. In the sidebar, click Integrations.
  2. Find Datadog and click Sign in. If Datadog already has a connection, the button is Add connection.
  3. Fill in:
    • Site Parameter: the site from Step 1.
    • API Key: the key from Step 2.
    • Application Key: the key from Step 3.
  4. 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​