Skip to main content
Pulumi logo Pulumi logo
  1. Docs
  2. Infrastructure AI
  3. Pulumi Agents
  4. Events and schedules
  5. Datadog webhook

Datadog webhook

This Pulumi Cloud feature is available in the Pro and Enterprise editions.

    After creating a webhook automation with the Datadog preset, keep the Pulumi setup panel open.

    Configure Datadog

    1. In Datadog, open Integrations and select Webhooks. On the Configuration tab, select New under Webhooks and enter a name.

    2. Paste the Pulumi webhook URL into URL.

    3. Replace Payload with the template below, also available through Copy payload in the Pulumi setup panel. It extends Datadog’s default payload with monitor fields that identify the alert.

      {
          "body": "$EVENT_MSG",
          "last_updated": "$LAST_UPDATED",
          "event_type": "$EVENT_TYPE",
          "title": "$EVENT_TITLE",
          "date": "$DATE",
          "org": {"id": "$ORG_ID", "name": "$ORG_NAME"},
          "id": "$ID",
          "alert_id": "$ALERT_ID",
          "alert_transition": "$ALERT_TRANSITION",
          "alert_priority": "$ALERT_PRIORITY",
          "alert_query": "$ALERT_QUERY",
          "alert_scope": "$ALERT_SCOPE",
          "hostname": "$HOSTNAME",
          "tags": "$TAGS",
          "link": "$LINK"
      }
      
    4. Under Custom Headers, paste the JSON from the setup panel: {"X-Pulumi-Trigger-Secret":"<pulumi-secret>"}. Replace <pulumi-secret> with the displayed Pulumi secret.

    5. Select Save in Datadog.

    6. Add @webhook-<name> to the notification message of each monitor that should invoke the agent, replacing <name> with the webhook’s name.

    7. Return to Pulumi and select Done.

    Test the connection

    Test a Datadog monitor whose notification message includes @webhook-<name>, replacing <name> with the webhook’s name.

    Follow Test a webhook to check delivery and task results. Test deliveries can run the agent.

      The infrastructure platform for humans and agents.