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

# Datadog

> Connect Datadog to Adapt with an API key to query metrics, monitors, events, and logs

Connect Datadog to Adapt with an API key so Adapt can query your monitoring
data, including metrics, monitors, events, and logs.

## Set up credentials

<Steps>
  <Step title="Open API key settings">
    Sign in to [Datadog](https://app.datadoghq.com/) and go to
    **Organization Settings > API Keys**.
  </Step>

  <Step title="Create an API key">
    Click **New Key**, enter a descriptive name, then click **Create API key**.
    Copy the key value and store it securely.
  </Step>

  <Step title="Note your Datadog site">
    Check the site for your organization in the browser address bar (for
    example, `datadoghq.com`, `us3.datadoghq.com`, `us5.datadoghq.com`, or
    `datadoghq.eu`). You will use this as `DD_SITE`.

    <Note>
      Your API key only works against the matching site. If `DD_SITE` does not
      match your organization's region, requests fail.
    </Note>
  </Step>
</Steps>

## Connect to Adapt

<Steps>
  <Step title="Open Integrations">
    In Adapt, go to **Settings > Integrations**.
  </Step>

  <Step title="Find Datadog">
    Search for **Datadog** and select it from the catalog.
  </Step>

  <Step title="Start the connection">
    Click **Connect** to open the connection form.
  </Step>

  <Step title="Add your credentials">
    Enter the values you gathered above, then click **Add connection**:

    | Secret Name  | Value                                            |
    | ------------ | ------------------------------------------------ |
    | `DD_API_KEY` | Your Datadog API key                             |
    | `DD_SITE`    | Your Datadog site, e.g. datadoghq.com (optional) |

    You can rename the connection and choose whether it is shared with your
    organization or kept personal to you.
  </Step>

  <Step title="Test the connection">
    Ask Adapt to list your monitors.
  </Step>
</Steps>

### Security

* Credentials are encrypted at rest with AES-256
* Use a dedicated API key (for example, owned by a service account) so you can rotate or revoke it without affecting other integrations
* Rotate keys regularly and remove any you no longer use
* Never share your API key or commit it to source control

## Capabilities

Adapt can query your Datadog metrics, monitors, events, and logs within what
the API key allows.

### Examples

```
List my monitors that are currently alerting.
```

```
Show the trend for system CPU usage over the last 24 hours.
```

```
Summarize events from the last hour by source.
```

```
Search my logs for errors from the payments service.
```
