When kogut itself is down
kogut edge
An external watchdog on Cloudflare Workers.
kogut edge is a Cloudflare Worker that alerts you when kogut stops sending heartbeats: an outage message after two minutes of silence, and a recovery message when heartbeats return. It runs on the free Workers plan. It does not run checks or serve a status page.
Deploy the Worker
-
Generate a shared token:
openssl rand -hex 32 -
Deploy the Worker:
Set
KOGUT_EDGE_TOKENto the shared token andNOTIFY_URLto an ntfy topic or webhook URL. The Worker sends plain-textPOSTmessages, withPriority: highon outage alerts.Or deploy from a clone:
cd packages/edge npx wrangler deploy npx wrangler secret put KOGUT_EDGE_TOKEN npx wrangler secret put NOTIFY_URL -
Optional: set
SERVER_NAMEfor messages andTIMEZONE, an IANA timezone such asEurope/Warsaw, for local times.
Connect kogut
- Open Settings → Watching kogut and click Set up beside kogut edge.
- Enter the Worker’s URL and the shared token. For a Worker under a path, include the
path, such as
https://example.com/kogut-edge. - Save and check the delivery status. Watching starts with the first heartbeat.
In kogut.toml:
[edge]
url = "https://kogut-edge.acme.workers.dev"
token = "${KOGUT_EDGE_TOKEN}"File settings take precedence and make the panel fields read-only. A token saved in the panel is not shown again. See the edge configuration reference.
Verify alerts
Stop kogut for more than two minutes and wait for the outage message, then start it and wait for recovery. Planned downtime alerts too.
kogut sends a heartbeat every 30 seconds. Failed sends retry with backoff.
Fix delivery failures
Settings → Watching kogut shows the last successful heartbeat or the failure.
| Response | Action |
|---|---|
401 | Make KOGUT_EDGE_TOKEN match the token in kogut |
500, missing or invalid NOTIFY_URL | Set a valid ntfy or webhook URL in the Worker |
500, invalid TIMEZONE | Use an IANA timezone or leave it empty for UTC |
404 | Check the Worker’s URL and route |
If messages do not arrive, read the Cloudflare logs. The Worker retries outage messages every minute and recovery messages on the next heartbeat.
Update the Worker
Copy the newer packages/edge/ into the repository the deploy button created; Cloudflare
deploys every push. From a clone, run git pull, then npx wrangler deploy in
packages/edge/.
Without Cloudflare, use a heartbeat URL.