Inputs

  • query: str: The query string to search within Datadog metrics and logs.
  • time_range: dict = None: The time range for the query (e.g., {'from': 'now-15m', 'to': 'now'})
  • source: str = None: The source type (metrics, traces, logs).

Example:

result = provider.query(
    query="avg:system.cpu.user{*}",
    from_time="now-1h",
    to_time="now"
)

Outputs

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

Additional Methods

MethodDescriptionRequired ScopesType
mute_monitorMute a monitormonitors_writeaction
unmute_monitorUnmute a monitormonitors_writeaction
get_monitor_eventsGet all events related to this monitorevents_readview
get_traceGet trace by idapm_readview
create_incidentCreate an incidentincidents_writeaction
resolve_incidentResolve an active incidentincidents_writeaction
add_incident_timeline_noteAdd a note to an incident timelineincidents_writeaction

Authentication Parameters

The api_key and app_key are required for connecting to the Datadog provider. You can obtain them as described in the “Connecting with the Provider” section.

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.

Scopes

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

  • monitors_read (Monitors Read) Required: True Description: View monitors.
  • monitors_write (Monitors Write) Required: False Description: Write monitors. (*Required for auto-webhook integration)
  • create_webhooks (Integrations Manage) Required: False Description: Create webhooks integrations. (*Required for auto-webhook integration)
  • metrics_read Required: False Description: View metrics.

Notes

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

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