pulsewatch
Self-hosted uptime, SLO and alerting service with a lightweight agent.
GitHub repo (opens in a new tab) ↗Changelog (opens in a new tab)
- License:
- AGPL-3.0
- CI security:
- CodeQL, gitleaks, npm audit, osv-scanner
~/problem
Teams that want to know whether their infrastructure is up or breaching its error budget, without adopting a full SaaS observability platform.
A Go (Gin) backend with an embedded scheduler, a SvelteKit dashboard, PostgreSQL and Redis. It checks targets, tracks incidents and error budgets, and dispatches alerts by webhook, email and mobile push. An agent covers private infrastructure by pushing telemetry through an OpenTelemetry collector.
~/highlights
- Scheduler with Postgres leasing so checks survive restarts without duplicates (ADR-0001).
- Alert suppression state machine and defined webhook delivery semantics (ADR-0002, ADR-0006).
- Worker-pool concurrency with context cancellation and graceful shutdown (ADR-0004).
- Three dispatch channels: webhook, email, and FCM/APNs push implemented directly without vendor SDKs, verified against mocks only.
- Live dashboard updates over Server-Sent Events (ADR-0010) and an AWS Lambda OTLP normalizer as an additive deployment target (ADR-0009).
- Kubernetes manifests for the backend, Postgres and Redis applied to a real single-node control plane, including rolling updates; Terraform apply, cert-manager, NetworkPolicy enforcement and the frontend and collector images are documented as unverified.
~/decisions
From the repo's own decision log, not summarized from memory.
Restart-safe, exactly-once scheduling via Postgres row leasing
A target's own slow check and a full process restart are two different race conditions that needed one mechanism to close, not two. Each target row is leased with an expiry tied to its own check timeout; a crash leaves an abandoned lease that self-heals on the next tick, with no separate recovery path to get wrong.
~/architecture
- SvelteKit dashboard → Go API
- Operator login, live target status, incidents, device list. Proxies the backend.
- Go API → PostgreSQL, Redis, Scheduler
- Operator auth, target and channel CRUD, SSE feed, OTLP ingestion.
- Scheduler → PostgreSQL, Alert dispatcher
- Embedded check runner using Postgres leases and a worker pool.
- Alert dispatcher → PostgreSQL
- Opens incidents and sends webhook, email and push.
- Agent and OTel collector → Go API
- Pushes telemetry from private infrastructure.
- PostgreSQL
- Targets, check results, hourly rollups, incidents, channels, agents, operators.
- Redis
- Supporting store for the backend.
~/stack
- Go
- Gin
- SvelteKit
- PostgreSQL
- Redis
- OpenTelemetry
- Kubernetes
- Terraform
- Docker
~/status
Session 22 complete, per the README. Real FCM/APNs delivery is permanently descoped (no live credentials) and Terraform on a real cloud is unverified. AGPL-3.0.
~/related
- pulsewatch-mobile React Native companion app for pulsewatch with incident push and deep links.