Skip to content

Better Stack

Better Stack Uptime can send an incident to any URL with your own headers and body. Two outgoing webhooks, one when an incident starts and one when it’s resolved, make the alert Critical and let the all-clear take its place.

This uses an API Source.

  1. In the Pocketbell app, create a Source named Better Stack, choose API, and copy its key.

  2. In Better Stack, open Incidents → Integrations, and under Exporting data → Outgoing webhooks, add an Incident webhook. Set it to send when an incident starts, and customize the request:

    • Method POST, URL https://api.pocketbell.dev/v1/messages

    • Headers: Authorization with Bearer pb_live_…, and Content-Type with application/json

    • Body:

      {
      "title": "$NAME is down",
      "message": "$CAUSE",
      "priority": "critical",
      "replace": "betterstack-$INCIDENT_ID",
      "tags": ["betterstack"]
      }
  3. Add a second incident webhook the same way, sent when an incident is resolved, with this body:

    {
    "title": "$NAME is back up",
    "message": "Resolved.",
    "priority": "normal",
    "replace": "betterstack-$INCIDENT_ID",
    "tags": ["betterstack"]
    }
  • Started repeats every five minutes, for up to an hour, until you acknowledge it on any device. Acknowledging it in Pocketbell doesn’t acknowledge the incident in Better Stack.
  • Resolved carries the same replace key, the incident’s ID, so it takes the alert’s place and the repeats stop.
  • Other placeholders include $URL, $STARTED_AT and $RESOLVED_AT.
  • If a monitor name or cause has a double quote in it, the JSON may break, depending on how Better Stack fills in the placeholders. Keep quotes out of monitor names that use this.