Skip to main content

Deadman

A dead man's switch for Prometheus/Alertmanager running on Cloudflare Workers and Durable Objects — alerts you when your monitoring goes silent.

TypeScript Cloudflare Workers Durable Objects Prometheus Alertmanager Monitoring

Overview

Deadman is a dead man’s switch for Prometheus/Alertmanager built on Cloudflare Workers and Durable Objects. Prometheus can’t alert you if it’s down — Deadman runs on independent infrastructure, expects periodic Watchdog heartbeats from Alertmanager, and notifies you when they stop arriving.

How It Works

  1. Heartbeat: Alertmanager sends a Watchdog alert to Deadman every minute, resetting a countdown timer (default 5 min).
  2. Alert: If the timer expires with no heartbeat, notifications fire on all configured channels (Discord, Slack, Telegram, Email). Repeats with a cooldown (default 15 min).
  3. Recovery: When heartbeats resume after an alert, a recovery notification is sent.

The entire switch is a single Durable Object — no polling, no cron jobs, no always-on processes. Each heartbeat sets a Durable Object alarm via setAlarm(), and Cloudflare handles persistence and scheduling in the DO’s SQLite storage.

Features

  • Multi-Channel Notifications — Discord, Slack, Telegram, and Cloudflare Email Routing
  • Zero Always-On Processes — Durable Object alarms handle all scheduling
  • One-Click Deploy — Deploy to Cloudflare Workers with a single click or CLI command
  • Configurable Timeouts — Customize heartbeat timeout and alert cooldown intervals
  • Custom Alert Messages — Template variables for personalized notification text
  • Simple API — Health, status, webhook, ping, and reset endpoints

Technology Stack

  • TypeScript on Cloudflare Workers with Durable Objects
  • Zod for runtime validation
  • Bun for local development and testing
  • Wrangler CLI for deployment