Watchdog
fleet watchdog
Check all registered apps and the docker-databases service for health issues. If any failures are found, send an alert via the configured notification adapters (Telegram).
Designed to be run on a cron schedule (e.g. every 5 minutes). Exits with code 1 if any services are unhealthy.
Usage
fleet watchdog [--motd]Flags
| Flag | Description |
|---|---|
--motd | Display failures only, do not send alerts. Always exits 0. Useful for SSH login banners. |
Examples
All healthy:
$ fleet watchdog✓ All 4 services healthyWith failures:
$ fleet watchdog! 2 service(s) unhealthy✗ worker: down (systemd: failed)✗ api: degraded (containers down: api-web-1; http check failed)✓ Alert sentWith --motd (no alerts):
$ fleet watchdog --motd! 1 service(s) unhealthy✗ worker: down (systemd: failed)What watchdog checks
docker-databasessystemd unit status- For each registered app:
- systemd unit state (must be
active) - Container running status
- HTTP health endpoint (if
healthPathis set in the registry)
- systemd unit state (must be
Notification configuration
Watchdog reads notify config from /etc/fleet/notify.json. It supports Telegram and BlueBubbles iMessage via an adapters array:
{ "adapters": [ { "type": "telegram", "botToken": "123456:ABC-DEF...", "chatId": "-100..." }, { "type": "bluebubbles", "serverUrl": "https://your-bluebubbles-server", "password": "your-password", "chatGuid": "iMessage;-;+15551234567", "cfAccessClientId": "...", "cfAccessClientSecret": "..." } ]}cfAccessClientId and cfAccessClientSecret are optional — only needed if the BlueBubbles server sits behind Cloudflare Access.
Running on a cron schedule
*/5 * * * * root /usr/local/bin/fleet watchdogRunning as an MOTD script
#!/bin/bash/usr/local/bin/fleet watchdog --motd