Skip to main content

Datadog Webhook

You can configure a Datadog Webhook to post data to Moogsoft Onprem when an event occurs in Datadog.

Refer to the LAM and Integration Reference to see the integration's default properties.

When you use the integrations UI, you can only configure the visible properties. If you want to implement a more complex Datadog Webhook LAM with custom settings, see Configure the Datadog Webhook LAM.

See the Datadog documentation for details on Datadog components.

Before You Begin

Before you start to set up your Datadog integration, ensure you have met the following requirements:

  • You have an active Datadog account.

  • You have the necessary permissions to create a webhook in Datadog.

  • Datadog can make requests to external endpoints over port 443. This is the default.

Configure the Datadog Integration

To configure the Datadog Webhook integration:

  1. Navigate to the Integrations tab.

  2. Click DataDog in the Monitoring section.

  3. Provide a unique integration name. You can use the default name or customize the name according to your needs.

  4. Set a Basic Authentication username and password.

Configure Datadog

Log in to Datadog to create a webhook to send event data to your system. For more help, see Datadog documentation.

  1. Create a webhook in Datadog.

  2. Add a name and enter the URL for this system:

    Field

    Value

    New Name

    Event Webhook

    New URL

    <your Datadog integration URL>

    For example: https://example.Moogsoft.com/events/datadog_datadog1

  3. Enable 'Custom Payload' and apply this template:

    {
        "source": "$HOSTNAME",
        "external_id": "$ALERT_ID",
        "severity": "$ALERT_TYPE",
        "type": "$EVENT_TYPE",
        "class": "$EVENT_TITLE",
        "agent_time": "$LAST_UPDATED",
        "id":"$ID",
        "alert_transition":"$ALERT_TRANSITION",
        "user":"$USER",
        "email":"$EMAIL",
        "username":"$USERNAME",
        "snapshot":"$SNAPSHOT",
        "link":"$LINK",
        "text_only_msg":"$TEXT_ONLY_MSG",
        "priority":"$PRIORITY",
        "tags":"$TAGS",
        "date":"$DATE",
        "alert_metrc":"$ALERT_METRIC",
        "alert_type":"$ALERT_TYPE",     
        "metric_namespace":"$METRIC_NAMESPACE",
        "aggreg_key":"$AGGREG_KEY",
        "org_id":"$ORG_ID",
        "alert_status":"$ALERT_STATUS",
        "alert_scope":"$ALERT_SCOPE",
        "alert_title":"$ALERT_TITLE",
        "alert_cycle_key":"$ALERT_CYCLE_KEY"
    }
  4. Encode the credentials from the Integrations UI in Base64 using the format "<userid>:<password>".

    For example "datadog:mqgrLAzahG2GJ9My" becomes "ZGF0YWRvZzptcWdyTEF6YWhHMkdKOU15".

  5. Create a 'Custom Header' using the encoded credentials as follows:

    {
        "Content-Type": "application/json",
        "Authorization": "Basic <base64 encoded credentials>"
    }

    For example:

    {
        "Content-Type": "application/json",
        "Authorization": "Basic ZGF0YWRvZzptcWdyTEF6YWhHMkdKOU15"
    }
  6. Add your webhook name as a service to notify for any Monitors that will send events to Moogsoft Onprem.

After you complete the configuration, Datadog sends new events to Moogsoft Onprem.