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

# Datadog

> Datadog provider allows you to query Datadog metrics and logs for monitoring and analytics.

## Authentication

This provider requires authentication.

* **api\_key**: Datadog Api Key (required: True, sensitive: True)
* **app\_key**: Datadog App Key (required: True, sensitive: True)
* **domain**: Datadog API domain (required: False, sensitive: False)
* **environment**: Topology environment name (required: False, sensitive: False)
* **oauth\_token**: For OAuth flow (required: False, sensitive: True)

Certain scopes may be required to perform specific actions or queries via the provider. Below is a summary of relevant scopes and their use cases:

* **events\_read**: Read events data. (mandatory)
* **monitors\_read**: Read monitors (mandatory) ([Documentation](https://docs.datadoghq.com/account_management/rbac/permissions/#monitors))
* **monitors\_write**: Write monitors  ([Documentation](https://docs.datadoghq.com/account_management/rbac/permissions/#monitors))
* **create\_webhooks**: Create webhooks integrations
* **metrics\_read**: View custom metrics.
* **logs\_read**: Read log data.
* **apm\_read**: Read APM data for Topology creation.
* **apm\_service\_catalog\_read**: Read APM service catalog for Topology creation.

## In workflows

This provider can be used in workflows.

As "step" to query data, example:

```yaml theme={null}
steps:
    - name: Query datadog
      provider: datadog
      config: "{{ provider.my_provider_name }}"
      with:
        query: {value}  
        timeframe: {value}  
        query_type: {value}  
```

Check the following workflow examples:

* [complex-conditions-cel.yml](https://github.com/keephq/keep/blob/main/examples/workflows/complex-conditions-cel.yml)
* [datadog-log-monitor.yml](https://github.com/keephq/keep/blob/main/examples/workflows/datadog-log-monitor.yml)
* [db\_disk\_space\_monitor.yml](https://github.com/keephq/keep/blob/main/examples/workflows/db_disk_space_monitor.yml)
* [service-error-rate-monitor-datadog.yml](https://github.com/keephq/keep/blob/main/examples/workflows/service-error-rate-monitor-datadog.yml)

## Topology

This provider pulls [topology](/overview/servicetopology) to Keep. It could be used in [correlations](/overview/correlation-topology)
and [mapping](/overview/enrichment/mapping#mapping-with-topology-data), and as a context
for [alerts](/alerts/sidebar#7-alert-topology-view) and [incidents](/overview#17-incident-topology).

## Provider Methods

The provider exposes the following [Provider Methods](/providers/provider-methods#via-ai-assistant). They are available in the [AI Assistant](/overview/ai-incident-assistant).

* **mute\_monitor** Mute a monitor (action, scopes: monitors\_write)

* **unmute\_monitor** Unmute a monitor (action, scopes: monitors\_write)

* **get\_monitor\_events** Get all events related to this monitor (view, scopes: events\_read)

* **get\_trace** Get trace by ID (view, scopes: apm\_read)

* **create\_incident** Create an incident (action, scopes: incidents\_write)

* **resolve\_incident** Resolve an active incident (action, scopes: incidents\_write)

* **add\_incident\_timeline\_note** Add a note to an incident timeline (action, scopes: incidents\_write)

## Connecting with the Provider

### API Key

To obtain the Datadog API key, follow these steps:

1. Log in to your Datadog account.
2. Navigate to the "Integrations" section.
3. Click on the "API" tab.
4. Generate a new API Key.

### App Key

To obtain the Datadog App Key, follow these steps:

1. Log in to your Datadog account.
2. Navigate to the "Integrations" section.
3. Click on the "API" tab.
4. Generate a new App Key or use an existing one.

## Fingerprinting

Fingerprints in Datadog are calculated based on the `groups` and `monitor_id` fields of an incoming/pulled event.

## Notes

*No information yet, feel free to contribute it using the "Edit this page" link at the bottom of the page*

## Useful Links

* [Datadog API Documentation](https://docs.datadoghq.com/api/)
* [Datadog Query Language](https://docs.datadoghq.com/dashboards/querying/)

## Webhook Integration Modifications

The webhook integration adds Keep as a monitor within Datadog. It can be found under the "Monitors" section.
The integration automatically gains access to the following scopes within Datadog:

* `monitors_read`
* `monitors_write`
* `create_webhooks`
