Datadog Monitor Alerts
The built-in Datadog Monitor trigger initiates flows when it receives a request from a webhook in Datadog.
- Go to the Triggers tab in the palette, expand the App Triggers section, and drag the trigger onto the canvas.
- Double-click the trigger (or click the pencil icon).
- Set the authenticating user, and then copy the URL — you'll use this to set up the webhook in Datadog.
- Click the Flood Control tab to edit the trigger's default flood control settings. For more information about these settings, see Trigger Flood Control.
- Connect the steps you want to run when xMatters receives a request to that URL.
You're now ready to configure Datadog to target the trigger.
Configure Datadog to send requests to the trigger URL
To have Datadog send alerts to the flow trigger, you need to configure a webhook and set it to use the trigger URL. You also need to create an event monitor to alert the webhook when certain types of events exceed a specified threshold.
- In Datadog, go to Integrations, locate the xMatters integration, and install it.
- Once installed, open the xMatters integration, go to the Configuration section, and click webhooks integration.
- Add a new webhook.
- Give the webhook a unique name.
- In the URL field, paste the trigger URL you copied from the Datadog trigger on the Flow Designer canvas.
- Add the target names of any recipients you want xMatters to notify when the monitor creates an alert.
- For example, if you want to notify Emma Pearson, Mary McBride, and the on-call members in the Monitor Team responsible for the service, you'd add ?recipients=epearson,mmcbride,monitor%20team to the URL. You must URL-encode any special characters or spaces in the target names.
- Overwrite the default payload with the following payload:
- Click Save.
- In Datadog, go to Monitors > Manage Monitors.
- Click + New Monitor.
- For the monitor type, select Event.
- In the Select events to count section, specify any criteria you want to use for matching events.
- In the Set alert conditions section, specify threshold conditions for the alert.
- In the Say what's happening section, add a name for your monitor and type the message you want to send.
- Include the webhook you previously created in the message using the format @name-of-webhook
- Select a priority for your monitor. This value is mapped to a severity level when xMatters initiates the incident.
- P1 (Critical): maps to 'Critical' in xMatters
- P2 (High): maps to 'High' in xMatters
- P3 (Medium): maps to 'Medium' in xMatters
- P4 (Low): maps to 'Low' in xMatters
- P5 (Info): maps to 'Minimal' in xMatters
- In the Notify your team section, add your webhook using the format @name-of-webhook. If you entered the name of your webhook in the monitor message, it will automatically be added to this section.
- Click Save.
You're now ready to use the webhook to trigger automated flows, including steps such as sending alerts and initiating incidents, though we always recommend testing before putting things into use.
The trigger has the following outputs you can use as inputs to steps further along the flow.
|List of targeted recipients. Recipients are set by adding a recipients query parameter to the trigger URL when you configure the webhook in Datadog. See the instructions for configuring the webhook for details.|
|Signal Mode||Determines the path the flow will take, based on the value of Event Title parameter.|
|Signal ID||Key or identifier used to terminate or correlate signals.|
|Event URL||Direct link to the event in Datadog.|
|Event Priority||Priority of the event.|
|Event ID||Unique ID of the event.|
|Event Title||Title of the event.|
|Full Message||Full text of the event message without markdown.|
|Short Message||Shortened version of the event message.|
|Event Type||Type of event.|
|Last Updated||Date the event was last updated in epoch format.|
|Alert ID||Unique ID of the alert.|
|Alert Transition||Status of the alert.|
|Alert Type||Type of alert.|
|Raw Request||JSON representation of the request. You can parse the raw request if you need additional details beyond the standard outputs.|