Datadog
This automation creates a link between Datadog and DevRev. When a new incident is created on Datadog or an existing incident is updated, the webhook is triggered and a payload is sent over to DevRev. Using this payload, a new incident is created and the existing incident is updated on DevRev.
Installation
- Open the DevRev marketplace and install the Datadog snap-in.
- Select the dev org where you want to install the snap-in, confirm your selection, and click Deploy snap-in.
- In DevRev app, setup the connection in Settings > Snap-ins >
Connections on top.
- Search and choose an existing connection or create a new one by clicking + Connection.
- Select Datadog from the dropdown list.
- Give it a connection name and paste your Datadog API Key, Application Key and Environment(prod/dev) in their respective fields.
Configuration
- Go to Snap-ins > All Snap-ins > Datadog > Configure.
- In the Connections tab, select the connection that you created.
This connection is necessary if you wish to bring stage and custom fields to DevRev.
- Select the default owner, part, and default severity value for incidents. This default incident value is used when the Datadog incident has UNKNOWN severity.
- Include the desired stage mapping from Datadog to DevRev.
- Create a custom field in DevRev with text field type to store the Datadog ID in DevRev and include the same in the Custom field to store Datadog ID field.
- Include the custom fields that you wish to bring to DevRev from Datadog. For multiple fields, provide comma-separated values.
The custom fields included in the input field while configuration must be created in DevRev. The field type must be either textbox or dropdown in Datadog. For Datadog ID field, Allow filtering in Field Actionables must be enabled.
-
Click Save and Install.
-
Copy the webhook URL and follow the below steps to connect it to Datadog via webhook integration.
a. Go to Integrations > Webhooks and click Install or Configure.
b. On the Configuration tab, enter a Name for the webhook and the webhook URL.
c. Add the following payload in the Payload section.
1 {2 "aggreg_key": "$AGGREG_KEY",3 "alert_metric": "$ALERT_METRIC",4 "alert_query": "$ALERT_QUERY",5 "alert_scope": "$ALERT_SCOPE",6 "alert_status": "$ALERT_STATUS",7 "alert_transition": "$ALERT_TRANSITION",8 "alert_type": "$ALERT_TYPE",9 "alert_url": "$LINK",10 "event_id": "$ID",11 "event_message": "$EVENT_MSG",12 "event_title": "$EVENT_TITLE",13 "event_type": "$EVENT_TYPE",14 "hostname": "$HOSTNAME",15 "incident_message": "$INCIDENT_MSG",16 "incident_title": "$INCIDENT_TITLE",17 "logs_sample": "$LOGS_SAMPLE",18 "public_id": "$INCIDENT_PUBLIC_ID",19 "snapshot_url": "$SNAPSHOT",20 "tags": "$TAGS",21 "timestamp": "$DATE"22 }d. Click Install Integration or Update Configuration.
e. Go to Incidents > Settings > Notification Rules.
f. Click Add New Rule.
g. Choose Declared or Updated to notify the webhook when the incident is both declared and updated.
h. Add the webhook Name followed by @webhook- in the Notify field.
i. Select the fields that needs to be updated when the notification is sent, in the Renotify on updates to field.
j. Click Save to enable the notification rule.
Once the above setup is complete, file a support ticket with DevRev to enable the Incident object in your workspace.