> ## Documentation Index
> Fetch the complete documentation index at: https://docs.resolve.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Datadog

This guide explains how to connect ResolveAI with Datadog. Resolve uses this connection to ingest metrics, logs, dashboards, and traces for alert investigations.

## 1. Create Tokens

In Datadog, create both an [**API Key**](https://app.datadoghq.com/organization-settings/api-keys) and [**App Key**](https://app.datadoghq.com/organization-settings/application-keys). On each page:

1. Click **+ New Key**
2. Name it `resolve` and click **Create Key**
3. Click **Copy** and save the key to use below

<Accordion title="App Key Scopes">
  If you use [Datadog App Key scopes](https://docs.datadoghq.com/account_management/api-app-keys/#scopes) for granular permissions, ensure you include the minimum requirements:

  * **APM**: apm\_api\_catalog\_read, apm\_pipelines\_read, apm\_read, apm\_service\_catalog\_read
  * **Dashboards**: dashboards\_read
  * **Events**: events\_read
  * **Logs**: logs\_read\_data, logs\_read\_index\_data
  * **Metrics**: metrics\_read, timeseries\_query
  * **Monitors**: monitors\_read (add `monitors_downtime` if using [Mitigation Actions](/mitigation-actions))
  * **Notebooks**: notebooks\_read
  * **RUM**: rum\_apps\_read
  * **SLOs**: slos\_read
  * **Teams**: teams\_read
  * **Usage**: usage\_read
</Accordion>

<Accordion title="Service Accounts">
  If you use datadog service accounts to manage App Keys, create a service account with a role with the permissions listed under "App Key Scopes".

  Then, create an App key for that service account.
</Accordion>

## 2. Connect Datadog

Set up the integration either in the **Resolve UI** or in the **Satellite** configuration.

<Tabs>
  <Tab title="Resolve UI">
    ### Connect Via Resolve UI

    1. Open [Datadog Integration](https://app0.resolve.ai/integrations/datadog/connect) in Resolve
    2. Click **Add Connection**
    3. Enter a name (ex. `Datadog-Main`)
    4. Leave **Environments** blank to ingest data from all environments, or list specific ones that match your Satellite config
    5. Paste your [**API Key**](https://app.datadoghq.com/organization-settings/api-keys) and [**App Key**](https://app.datadoghq.com/organization-settings/application-keys) from Datadog
    6. Enter your site domain (ex. `datadoghq.com`)
    7. (Optional) Enable [Sensitive Data Redaction](/sensitive-data-redaction)
    8. Turn on the toggle **Service Map Enabled**
    9. Click **Save**
  </Tab>

  <Tab title="Satellite">
    ### Connect Via Satellite

    Save the Datadog [API Key](https://app.datadoghq.com/organization-settings/api-keys) and [App Key](https://app.datadoghq.com/organization-settings/application-keys) in a Kubernetes secret, then update the Resolve Satellite to use these secrets.

    #### 1. Create Kubernetes Secret

    Create a Kubernetes secret using this structure.

    ```yaml secret creation theme={null}
    apiVersion: v1
    kind: Secret
    type: Opaque
    metadata:
      name:  datadog-resolve-token
    stringData:
      apiKey: "<your API key>"
      appKey: "<your App key>"
    ```

    <Warning>
      **Security Best Practice:** Never store credentials in plaintext in configuration files or source control.
      Always use Kubernetes secrets and encrypt etcd or use enterprise secret management systems.
      See [Secret Management](/secret-management) for detailed guidance.
    </Warning>

    Apply the secret.

    ```shell apply secret theme={null}
    kubectl apply -f datadog-resolve-token.yml
    ```

    ***

    #### 2. Update Values File

    Add the Datadog integration to `resolve-values.yaml`.

    ```yaml resolve-values.yaml theme={null}
    integrations:
      datadogOnPrem:
        type: "datadog"
        create: true
        secretName: "datadog-resolve-token"
        connection:
          site: datadoghq.com
          serviceMapEnabled: true
    ```

    (Optional) Add [sensitive data redaction](/sensitive-data-redaction) with `redactionConfig`.

    ```yaml resolve-values.yaml theme={null}
    integrations:
      datadogOnPrem:
        type: "datadog"
        create: true
        secretName: "datadog-resolve-token"
        connection:
          site: datadoghq.com
          serviceMapEnabled: true
          redactionConfig:
            enabled: true
    ```

    ***

    #### 3. Apply Changes

    Update the satellite with the new `resolve-values.yaml` file.

    ```shell theme={null}
    helm upgrade --install resolve-satellite \
      oci://registry-1.docker.io/resolveaihq/satellite-chart \
      --values resolve-values.yaml
    ```

    ***

    #### 4. Verify Integration

    Open [Datadog Integration](https://app0.resolve.ai/integrations/datadog/connect) and check the connection.
  </Tab>
</Tabs>

***

## Alert Webhooks

1. Open [Datadog Integration](https://app0.resolve.ai/integrations/datadog/connect) and click the integration in the table
2. Scroll down and click **Edit**
3. In **Webhooks** click the `+` button to create a new token
4. Name the token **Monitors** and click **Save**
5. Keep the **Configure Webhook Integration** page open in a tab
6. In a secon tab, open the [Datadog Webhooks Integration](https://app.datadoghq.com/integrations/webhooks)
7. Next to **Webhooks** click **+ New**
8. Copy fields from the **Configure Webhook Integration** tab (Step 5), click **Save**
9. Open your [Datadog Monitors](https://app.datadoghq.com/monitors/manage)
10. For each monitor, click **Edit**
11. In **Configure notifications & automations** add `@webhook-resolveai`

<Info>
  Managing monitors with **Terraform**? Add `@webhook-resolveai` to each monitor's **Message** field instead.
</Info>
