Skip to content

10.8Webhook

A webhook channel sends each alert as an HTTP POST request to a URL on your own system. Use it to connect obsrvly to your own tools. Chapter 11 shows what obsrvly sends and how to check the signature. The dashboard has a reference page under alerting → webhook docs.

  1. In New alert channel, choose Webhook.
  2. Enter a Name and the Webhook URL, for example https://your.app/alerts.
  3. Optional: enter an HMAC signing secret.
  4. Optional: select Add header for each extra header.
  5. Select Create channel, then send a test alert (10.9).
FieldWhat to enter
Webhook URLRequired. The https:// address that receives the alerts.
HMAC signing secretOptional. A secret value only you and obsrvly know. When set, each request carries an X-Obsrvly-Signature: sha256=... header. Your system uses it to check that the request came from obsrvly (11.4). The secret is saved exactly as typed, so spaces count.
HeadersOptional. Headers sent with every request, such as name Authorization and value Bearer .... Rows with an empty name are dropped.

Header limits#

  • At most 50 headers. Otherwise: webhook_headers can hold at most 50 headers.
  • Each name must be a valid HTTP header name. Otherwise: webhook_headers: "<name>" is not a valid header name.
  • A value cannot contain a line break or another character a header cannot carry.
  • Name and value together can be at most 8 KiB.

API: CreateWebhookChannel with name, webhookUrl, and optional webhookHeaders (an object of name and value) and webhookSecret.

Create a webhook channel
bash
curl -s \
  "$OBSRVLY_API/monitor/obsrvly.v1.MonitorConfigService/CreateWebhookChannel" \
  -H "Authorization: Bearer $OBSRVLY_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "on-call",
       "webhookUrl": "https://your.app/alerts",
       "webhookSecret": "<your-secret>",
       "webhookHeaders": {"Authorization": "Bearer <token>"}}'

Last updated