Datadog is a monitoring service for cloud-scale applications, providing monitoring of servers, databases, tools, and services, through a SaaS-based data analytics platform.

When an event is triggered in Datadog, an alert is created. The information of the Datadog event is carried over.

OpsRamp configuration

Step 1: Install the integration

  1. Select a client from the All Clients list.
  2. Go to Setup > Integrations > Integrations.
  3. From Available Integrations, select Monitoring > Datadog and click Install.
  4. Enter:
    • Name
    • IP address
    • Credentials. Select an existing credential or create a new credential.
  5. Click Save.

Step 2: Configure the integration

  1. From the API tab, enter:
    1. Authentication: Copy Tenant Id, Token, and Webhook URL for configuration. These settings are used for creating an HTTP Request template.
    2. Map Attributes: Enter the mapping information for the third-party.
      1. Select the required OpsRamp property from the drop-down.
      2. Click Add Mapping Attributes to map attributes for the specific OpsRamp alert property.
      3. Enter the entity and property value.
  2. From the Monitoring of Integration tab, click Assign Templates.
    1. Select the IntgMonittool template.
    2. Click Assign Templates.
      Monitoring of Integrations
  3. From the Audit Logs, set up audit log criteria and time frame.

Property mappings

Datadog PropertyOpsRamp Property
eventTitleAlert subject
eventDetailsAlert description
dateAlert time
eventAlertTypeAlert state
Datadog Property ValueOpsRamp Property Value
errorCritical
successOk
eventAlertMetricAlert metric
eventHostNameAlert resource name

Sample: Datadog Webhook payload

        {
         "id": "4804742212344586948",
         "eventTitle": "\[Triggered on {host:hydlpt110}\] \[TEST\] CPU load is high",
         "eventType": "service\_check",
         "evenAlertID": "8360816",
         "eventAlertType": "error",
         "eventHostName": "hydlpt110",
         "eventAlertMetric": null,
         "eventAlertTittle": "\[TEST\] CPU load is high on host:hydlpt110",
         "date": "1550647818000",
         "org": {
          "id": "245725",
          "name": "dev"
         },
         "eventDetails": {
          "email": "",
          "eventMsg": "%%%\\nPlease chcek @webhook-OR-webhook\\n\\nTest notification triggered by james096@gmail.com.\\n\\n\\n\\n\\n\\n- - -\\n\\n\[\[Monitor Status\](https://app.datadoghq.com/monitors#8360816?group=host%3Ahydlpt110)\] · \[\[Edit Monitor\](https://app.datadoghq.com/monitors#8360816/edit)\] · \[\[View hydlpt110\](https://app.datadoghq.com/infrastructure?filter=hydlpt110)\] · \[\[Show Processes\](https://app.datadoghq.com/process?sort=memory%2CASC&to\_ts=0&tags=host%3Ahydlpt110&from\_ts=-900000&live=false&showSummaryGraphs=true)\]\\n%%%",
          "eventTxtMsg": "\\nPlease chcek @webhook-OR-webhook\\n\\nTest notification triggered by james096@gmail.com.\\n\\nMetric Graph: https://app.datadoghq.com/monitors#8360816?to\_ts=1550647878000&group=host%3Ahydlpt110&from\_ts=1550644218000 · Monitor Status: https://app.datadoghq.com/monitors#8360816?group=host%3Ahydlpt110 · Edit Monitor: https://app.datadoghq.com/monitors#8360816/edit · Event URL: https://app.datadoghq.com/event/event?id=4804742212344586948 · View hydlpt110: https://app.datadoghq.com/infrastructure?filter=hydlpt110",
          "evenDatePost": "1550647818",
          "eventAggregKey": "36adb48abb510bd80816c1f423f2a8f0",
          "eventAlertStatys": "",
          "eventUserName": "",
          "eventSnaoShot": null,
          "eventLink": "https://app.datadoghq.com/event/event?id=4804742212344586948",
          "eventTags": "check:cpu,host:hydlpt110,monitor",
          "eventLastUpdatedPosix": "1550647818",
          "eventAlertQuery": "\\"datadog.agent.check\_status\\".over(\\"check:cpu\\").by(\\"host\\").last(2).count\_by\_status()",
          "eventAlertScope": "host:hydlpt110",
          "eventAlertCycleKey": "4804731423302266881",
          "last\_updated": "1550647818000"
         }
        }

Datadog configuration

Step 1: Configure Webhook

Webhook allows you to connect with OpsRamp and alert OpsRamp when an event is triggered.

  1. Log into Datadog.
  2. Click the Integrations icon and click Integrations.
  3. Configure Webhook and click Update Configuration to save the details.
    Webhook Configuration
    1. Name: Enter a name for Webhook. For example, OpsRamp-Alerts.
    2. URL: Enter the Webhook URL copied from OpsRamp.
      For example: https://<api-url>/integrations/alertsWebhook/client_1/alerts?vtoken=bOvr34Kh3Jm3eVJkmfBND7uJ9gyF72bL
    3. Use custom payload: Select the custom payload option.
    4. Custom payload: Enter the below payload
    5. Encode as form: Not Applicable.
    6. Header: Not Applicable.
Name and URL for Webhook Configuration

Custom payload syntax

{
    "id": "$ID",
    "eventTitle": "$EVENT\_TITLE",
    "eventType": "$EVENT\_TYPE",
    "evenAlertID": "$ALERT\_ID",
    "eventAlertType": "$ALERT\_TYPE",
    "eventHostName": "$HOSTNAME",
    "eventAlertMetric": "$ALERT\_METRIC",
    "eventAlertTittle": "$ALERT\_TITLE",
    "date": "$DATE",
    "org": {
        "id": "$ORG\_ID",
        "name": "$ORG\_NAME"
        },
    "eventDetails": {
        "email": "$EMAIL",
        "eventMsg": "$EVENT\_MSG",
        "eventTxtMsg": "$TEXT\_ONLY\_MSG",
        "evenDatePost": "$DATE\_POSIX",
        "eventAggregKey": "$AGGREG\_KEY",
        "eventAlertStatys": "$ALERT\_STATUS",
        "eventUserName": "$USERNAME",
        "eventSnaoShot": "$SNAPSHOT",
        "eventLink": "$LINK",
        "eventTags": "$TAGS",
        "eventLastUpdatedPosix": "$LAST\_UPDATED\_POSIX",
        "eventAlertQuery": "$ALERT\_QUERY",
        "eventAlertScope": "$ALERT\_SCOPE",
        "eventAlertCycleKey": "$ALERT\_CYCLE\_KEY",
        "last\_updated": "$LAST\_UPDATED"
        }
}

Step 2: Enable notifications

Notifications allow you to notify OpsRamp about an event.

  1. Click the Select Monitor icon and click Manage Monitors.
  2. Select the monitor that you want to enable the integration to OpsRamp and edit the settings.
  3. In the Notify your team section, type @ to see the available list of Webhooks to trigger.
  4. Select the configured Webhook and specify notifications and restrictions for notification.
Datadog Notifications

When a monitor alerts, a POST request is sent to the Webhook URL.