Alerts

Webhook alerts

Table of contents
  1. Settings
    1. Webhook URL
  2. Anatomy of the webhook HTTP request
    1. Body
      1. Example

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 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:

PathTypeDescription
messagestringA human-readable description for the notification.
monitor.iduintMonitor's id.
monitor.kindstringMonitor's kind. It can be HEARTBEAT or HTTP.
monitor.namestringMonitor's name.
monitorPeriod.endedAtstring or nullRelevant monitor period's end date and time in ISO-8601 format. Will be null for downtime or slow start notifications.
monitorPeriod.iduintRelevant monitor period's id.
monitorPeriod.startedAtstringRelevant monitor period's start date and time in ISO-8601 format.
monitorPeriod.statusstringRelevant period's status. It can be DOWN or SLOW for HTTP monitors. And only DOWN for heartbeat monitors.
reportUrlstringURL 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"
  }
}