We are excited to announce the addition of a new notification channel - Webhooks! With this new action, users can integrate their alerts with a webhook endpoint of their choice. A webhook request will be sent to the endpoint specified by the user whenever an incident event occurs on Locale.
What you can do with this integration?
Instantly receive updates about events as they happen through via webhook endpoint.
Users can now customize downstream notifications by implementing custom logic based on the raw event data.
How to set up a webhook?
When creating an alert (or editing an existing alert):
Select webhook from the list of notification channels.
Select the event type for which you want to receive a webhook request.
New Incidents: whenever a new incident of this alert is created or resolved locale will send a webhook request to the given endpoint
Escalated Incidents: Whenever any incident of this alert is escalated locale will send a webhook request to the given endpoint
Enter your webhook endpoint in the textbox. It has to be a fully qualified link i.e URL should include the protocol (such as "https://" or "http://")
Once the above-mentioned details are filled in, you can test the setup by clicking on
Send Test Notification
the button which will send a dummy payload to the webhook endpoint.
Webhook Payload Fields
Field | Value | Description | Nullable |
|
| Indicates the type of incident event that has triggered the webhook request. | ❌ |
|
| Unique identifier of the organization that the incident belongs to. | ❌ |
|
| Timestamp of when the incident event occurred. | ❌ |
|
| An object that contains details about the webhook event. | ❌ |
|
| Name of the incident | ❌ |
|
| Unique identifier of the incident | ❌ |
|
| Current status of the incident |
❌ |
|
| The priority level of an incident | ✅ |
|
| Url of the incident. | ❌ |
|
| An object which contains Information about the user assigned to the incident. | ✅ |
|
| Unique identifier of the assigned user. | ✅ |
|
| Name of the assigned user. | ✅ |
|
| email of the assigned user. | ✅ |
|
| profile picture of the assigned user. | ✅ |
|
| An object which contains Information about the team to which the incident is assigned. | ✅ |
|
| Unique identifier of the team. | ✅ |
|
| Name of the team. | ✅ |
|
| An object which contains Information about the alert to which the incident belongs. | ❌ |
|
| Unique identifier of the alert. | ❌ |
|
| Name of the alert. | ❌ |
|
| An object which contains Information about the escalation config. The object is not present if the escalation config is not set up for the alert. | ✅ |
|
| Indicates whether the incident has been escalated. | ✅ |
|
| Threshold time in minutes for escalation of the incident. | ✅ |
|
| An object which contains information about the user to which the incident is escalated. | ✅ |
|
| Unique identifier of the escalated user. | ✅ |
|
| Name of the escalated user. | ✅ |
|
| email of the escalated user. | ✅ |
|
| profile picture of the escalated user. | ✅ |
|
| An object which contains information about the query result of the incident. | ❌ |
|
| Type of the payload. In the case of | ❌ |
|
| Number of rows in the query result | ❌ |
|
| Query results as a JSON object. This field is present only if | ✅ |
|
| URL to the CSV file which contains query results. This field is present only if | ✅ |
💡 Locale will make a POST request to the webhook endpoint. |
An example of a webhook payload
{
"payload": {
"event_type": "incident.created",
"org_id": "34cb66d7-369a-4762-88e9-e4a92505dfec",
"resource": "incident",
"occured_at": "2023-01-23 13:30:14.686357",
"data": {
"name": "Clubbed incident test",
"id": "0bbf73de-d473-469e-88b3-fa6d3889846e",
"status": "Unresolved",
"priority": "Medium",
"incident_link": "https://go.locale.ai/xxx/incidents/xxx",
"alert": {
"resource": "alert",
"id": "e4c062f8-e2b9-4dfe-8b64-1ea0e28aa23e",
"name": "Alert Name"
},
"payload": {
"type": "url",
"row_count": 10,
"url": "https://tesseract.locale.ai/results/query_data?incident_id=0bbf73de-d473-469e-886d3889846e&expiry=1682370012636&token=p779LLusIUg5nBXtx192txB7ZL9ND%2BC4%2FJDkQ4eKhhas%2FJjw9OZXfJT9elvOSl2Z7Q%3D%3D"
},
"user_assigned": {
"resource": "user",
"id": "4e3661d4-a883-4566-bb50-289b30b728dc",
"name": "Nishit Patel",
"email": "[email protected]",
"avatar": "http://storage.googleapis.com/avatar_store_locale/05.jpg"
},
"team": {
"resource": "team",
"id": "11e1823f-a9d2-4ec3-b6c6-c8bb11cf2b8f",
"name": "Bangalore Team"
}
}
}
}
To conclude, the new webhook notification channel allows users to integrate their alerts with any webhook endpoint, providing real-time information on incidents.
Happy Alerting 🙌🏻