Skip to main content

Webhooks

The Embrace Webhooks feature is an outgoing webhook sent by Embrace when an alert condition is met. Here is a high-level flow diagram:

Generic Webhook

In order to see a sample of the payload sent by the Embrace dash, you can setup a test webhook with webhook.site:

First, within the Embrace dashboard, click on the gear icon to access the Settings page.

Select the Notifications tab.

In the Webhook Integration area, there is a Nickname field and the Webhook URL field:

When you navigate to the webhook.site page, you will get a randomly generated path; paste that path in the Webhook URL field in the Embrace dash.

For example: https://webhook.site/b8a8c93a-0111-48d0-aedc-051092311a6a

In this example, the Nickname is “webhook.site” and the Webhook URL is the random path from the webhook.site page.

Click on TEST to see the webhook show up on webhook.site.

Jira Integration

In your Project, click on Project settings

Then click on Create rule Search for webhook, then click on Incoming webhook

Choose “No issues from the webhook”

Click Save

Add a New action

Choose Create issue

Complete the rest of the Jira automation per your organization’s needs.

PagerDuty Integration

You will need to setup a Custom Event Transformer integration (CET).

Follow the instructions on the PagerDuty documentation for CET

When you get to steps 5-7, modify the JavaScript and replace it with the following code (you can also customize it to fit your needs):

var webhook = PD.inputRequest.body;
var event_type = PD.Trigger;
if(webhook.event.metric_props.new_state=="Normal") {event_type = PD.Resolve;}

var normalized_event = {
event_type: event_type,
incident_key: webhook.alert.id,
description: webhook.alert.name,
details: {
description: webhook.event.metric_props,
environment: webhook.app.environment,
app_id: webhook.app.id,
app: webhook.app.name,
platform: webhook.app.platform
},
client: "Embrace Dashboard",
client_url: webhook.links.dashboard_url
};

PD.emitGenericEvents([normalized_event]);

Finally, copy the Integration URL generated in the CET Integration Configuration step into the Embrace dash.

Troubleshooting Webhooks

Your webhook will be disabled if the alerts fail to deliver 3 times in a row.

To fix the disabled webhook, select the webhook to edit. Re-test the webhook to validate.

To examine the payload that is being sent, use the Webhook.site page mentioned above.

Invalid Webhooks will also trigger an email alert. For example, you will get an email alert similar to this:

After 2 failed email notifications, you will get a final email alert: