Table of contents
Webhook alerts enable you to deliver status change notifications to an HTTP server. By webhook alerts you can:
- receive events on your in-house HTTP service and automate something from there,
- deliver notifications to any third-party tool or service that will handle the event in a different way (for example, IFTTT or Zapier).
If there is a third-party tool or service that you want to use for getting alerts from WebGazer, please let us know.
Settings
Please see here for common configuration options that are not specific to e-mail alerts.
Webhook URL
Webhook URL is the URL that WebGazer will send an HTTP request when there is a status update for the selected monitors. Its protocol can be HTTP or HTTPS.
Anatomy of the webhook HTTP request
Webhook alerts deliver an HTTP POST request with a JSON payload.
The incoming request will have these headers:
Content-Type: application/json
User-Agent: WebGazer/1.0 (+https://www.webgazer.io)
Body
The incoming request's body will have this data:
Path | Type | Description |
---|---|---|
message | string | A human-readable description for the notification. |
monitor.id | uint | Monitor's id. |
monitor.kind | string | Monitor's kind. It can be HEARTBEAT or HTTP . |
monitor.name | string | Monitor's name. |
monitorPeriod.endedAt | string or null | Relevant monitor period's end date and time in ISO-8601 format. Will be null for downtime or slow start notifications. |
monitorPeriod.id | uint | Relevant monitor period's id. |
monitorPeriod.startedAt | string | Relevant monitor period's start date and time in ISO-8601 format. |
monitorPeriod.status | string | Relevant period's status. It can be DOWN or SLOW for HTTP monitors. And only DOWN for heartbeat monitors. |
reportUrl | string | URL for the relevant monitor's report. |
Example
Here is an example request body:
{
"message": "WebGazer website is down.",
"monitor": {
"id": 1,
"kind": "HTTP",
"name": "WebGazer website"
},
"monitorPeriod": {
"endedAt": null,
"id": 1,
"startedAt": "2024-03-29T23:53:27.277825Z",
"status": "DOWN"
}
}