Get a first look at what's coming. The Developer Passport Australia Release Preview kicks off March 12. Dive in! 

Datadog webhook integration

stevek
Tera Contributor

I am trying to send events from Datadog using a webhook integration.
I tried the suggested payload mentioned here: https://www.servicenow.com/docs/r/it-operations-management/event-management/datadog-events-webhook.h...
But the host_name is not showing up properly.
I have a Datadog tag, device_name so when I hard code that, I can see the expected host:
host_name: $TAGS[device_name]
But what happens if I don't have a device_name tag? 

2 REPLIES 2

stevek
Tera Contributor

I am adding my webhook payload here:
{
  "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_metric": "$ALERT_METRIC",

  "metric_namespace": "$METRIC_NAMESPACE",

  "alert_priority": "$ALERT_PRIORITY",

  "alert_transition": "$ALERT_TRANSITION",

  "alert_status": "$ALERT_STATUS",

  "alert_title": "$ALERT_TITLE",

  "alert_type": "$ALERT_TYPE",

  "host_name": "$TAGS[device_name]",

  "priority": "$PRIORITY",

  "tags": "$TAGS",

  "alert_scope": "$ALERT_SCOPE"

}

stevek
Tera Contributor

We changed the event to create a tag in Datadog. But the webhook payload is still specific to the type of event. In this case it is a network event.
Seeing as no one has posted a response, it makes me think that webhooks are not widely used for Datadog to ServiceNow integrations. Maybe people are using Service Graph Connectors?