Skip to main content

Statuspage

Process Statuspage.io incident webhooks with automatic deduplication and component state tracking.

Supported Input

Statuspage.io sends webhook payloads for incident updates and component status changes. The interpreter handles both and rejects other payloads:

  • Incident updates — Creates notifications with the incident name, status, impact level, and the latest update's text. Priority is inferred from impact level: critical = 5, major = 4, minor = 3.
  • Component updates — Stored in Cloudflare KV without sending a notification. The next incident notification lists each stored component, plus any the incident update affects, with its current status.
  • Malformed JSON — Fails with HTTP 422 instead of being silently ignored, so the configured error-topic path can report it.
  • Anything else — A JSON payload with neither incident nor component_update fails with HTTP 422 (Unrecognized Statuspage.io payload: expected "incident" field).

info

Component-only updates (no incident) never send a notification, and they only update the stored state when a KV namespace is bound. The interpreter also returns null for an incident update that KV shows was already sent.

KV State Management

The Statuspage interpreter uses Cloudflare Workers KV to deduplicate notifications and track component state:

  • Stores incident and component state under statuspage:{pageId} keys.
  • State has a 24-hour TTL and is automatically cleaned up.
  • Without a KV namespace bound, component-only updates are dropped, and every incident update sends a notification with no duplicate check and no component list.

warning

If you are receiving duplicate Statuspage notifications, see Troubleshooting for instructions on setting up KV deduplication.

Service Name Extraction

The service name is the hostname of the payload's meta.unsubscribe URL, without a leading www. (e.g., githubstatus.com). If no unsubscribe URL is available, it defaults to Statuspage.

Notification Output

  • Title: [Service Name] Incident Name (e.g., [githubstatus.com] Elevated Error Rates).
  • Body: Markdown with the status, impact level, and latest update's text. With a KV namespace bound, an Affected list follows with each stored component and its current status.
  • Priority: Based on impact — critical = 5, major = 4, minor = 3, default = 2. Terminal statuses (resolved, completed, postmortem) override priority to 2 regardless of impact.
  • Tags: Includes statuspage, the current status (e.g., investigating, resolved), and an emoji based on the status.
  • Actions: "View Incident" link to the Statuspage.io incident page, and "Unsubscribe" link if available.

Example Webhook Payload

json
{
  "meta": { "unsubscribe": "https://www.githubstatus.com/?unsubscribe=abc123" },
  "page": { "id": "abc123" },
  "incident": {
    "name": "Elevated Error Rates",
    "status": "investigating",
    "impact": "major",
    "shortlink": "https://stspg.io/abc123",
    "incident_updates": [
      { "id": "update-1", "body": "We are investigating elevated error rates." }
    ]
  }
}