Alert bridge: self-hosted Cloudflare Worker
What it is
Section titled “What it is”The alerts-bridge is an open-source Cloudflare Worker that translates Monitive webhook events into push notifications. Deploy it once to your own Cloudflare account and every monitor’s down/up event reaches your phone, Slack workspace, or Discord server — via Pushover, ntfy, Slack, Discord, or Telegram.
You own the Worker. Monitive sends the webhook; the bridge forwards it to your provider. No third-party relay, no vendor lock-in.
Prerequisites
Section titled “Prerequisites”- A Cloudflare account (free tier is enough)
- Node 20 or newer
- A UptimeMonitoring.com account with at least one monitor
- A provider account — this walkthrough uses Pushover
Get the code
Section titled “Get the code”git clone https://github.com/uptimemonitoring/alerts-bridgecd alerts-bridgenpm installDeploy
Section titled “Deploy”Log in to Cloudflare, then deploy:
npx wrangler loginnpm run deployWrangler prints the Worker URL when the deploy succeeds:
Published alerts-bridge (0.00 sec) https://alerts-bridge.<your-subdomain>.workers.devNote that URL — you register it with your monitor next.
Wire to Monitive
Section titled “Wire to Monitive”- Open the monitor in app.uptimemonitoring.com → the Webhook section.
- Set the webhook URL to the
*.workers.devURL from the deploy step and save. - Reveal and copy the Signing secret shown there — you’ll paste it as
MONITOR_WEBHOOK_SECRETSin the next step.
(API equivalent: PUT /api/v1/monitors/<id>/webhook -d '{"url":"…"}' returns the secret; GET re-reads it.) The bridge verifies the X-UptimeMonitoring-Signature header against this secret on every request — see Webhooks for the signature contract.
Set secrets
Section titled “Set secrets”Configure the Worker secrets with npx wrangler secret put. Wrangler prompts you for each value; nothing is written to disk.
# Which provider to usenpx wrangler secret put PROVIDER# → pushover
# Pushover application token (from pushover.net → Your Applications)# Tip: name the Pushover application "UptimeMonitoring" — that name is what# shows as the source on each push notification.npx wrangler secret put PUSHOVER_TOKEN
# Pushover user key (from pushover.net → Your User Key)npx wrangler secret put PUSHOVER_USER
# The whs_live_… signing secret you copied from the monitor's Webhook section abovenpx wrangler secret put MONITOR_WEBHOOK_SECRETSWatch the Worker logs in one terminal:
npx wrangler tailThen trigger a real event: point the monitor at a URL that returns 5xx (or stop the service it watches) so Monitive fires a down webhook, then restore it to fire up. Confirm each notification arrives on your device, and watch wrangler tail for the incoming request and the provider’s response.
If your monitor’s webhook settings offer a test-send button, that’s the fastest way to fire a sample delivery without affecting the monitor’s real state.
Provider reference
Section titled “Provider reference”Set PROVIDER to one of the values in the first column and supply the corresponding secrets:
PROVIDER value | Required secrets | Notes |
|---|---|---|
pushover | PUSHOVER_TOKEN, PUSHOVER_USER | Pushover app token + user key |
ntfy | NTFY_TOPIC (+ optional NTFY_URL, NTFY_TOKEN) | NTFY_URL defaults to https://ntfy.sh; NTFY_TOKEN only for protected topics |
slack | SLACK_WEBHOOK_URL | Slack incoming webhook URL |
discord | DISCORD_WEBHOOK_URL | Discord webhook URL |
telegram | TELEGRAM_BOT_TOKEN, TELEGRAM_CHAT_ID | Bot token + target chat ID |
Troubleshooting
Section titled “Troubleshooting”401 from the Worker
The signature verification failed. Check that the MONITOR_WEBHOOK_SECRETS value in the Worker matches the signing secret shown in the Monitive webhook settings exactly — trailing whitespace or a copy-paste error will cause every request to be rejected.
No push notification
Signature passed but the provider rejected the request. Double-check PUSHOVER_TOKEN and PUSHOVER_USER (or the equivalent for your provider). Run npx wrangler tail while triggering a test event to see the provider’s error response.
413 Request Entity Too Large The webhook payload exceeded the Worker’s request size limit. This should not happen with standard Monitive payloads — if it does, open an issue in the alerts-bridge repository.