Install
openclaw skills install openclaw-gateway-watchdog-skillMonitor OpenClaw gateway health with a watchdog state machine, Discord alerts, cooldown dedupe, and isolated fallback deployment on macOS. Use when users want gateway failure detection, auto-recovery policy, and low-noise Discord incident notifications.
openclaw skills install openclaw-gateway-watchdog-skillDiscord-first watchdog for OpenClaw gateway incidents.
Tell OpenClaw: "Install the gateway-watchdog skill." The agent will handle the installation and configuration automatically.
If you prefer the terminal, run:
clawhub install gateway-watchdog
~/.openclaw/watchdogs/gateway-discord/.openclaw.json are required.GW_WATCHDOG_ENABLE_RESTART=0).scripts/gateway-watchdog.sh - health checks + state machine + Discord notification.scripts/install-launchd.sh - installs a user LaunchAgent from template.references/com.openclaw.gateway-watchdog.plist.template - launchd template.references/cron-agent-turn.md - isolated cron prompt template.The watchdog checks:
openclaw gateway status --json
openclaw health --json --timeout <ms>
Pass criteria:
runningFailure classes:
runtime_stoppedrpc_probe_failedhealth_unreachableauth_mismatchconfig_invalidbash "{baseDir}/scripts/gateway-watchdog.sh"
Optional env:
export DISCORD_WEBHOOK_URL="https://discord.com/api/webhooks/..."
export DISCORD_BOT_TOKEN="discord_bot_token"
export DISCORD_CHANNEL_ID="<your_discord_channel_id>"
export GW_WATCHDOG_SOURCE="manual"
export GW_WATCHDOG_FAIL_THRESHOLD=2
export GW_WATCHDOG_COOLDOWN_SECONDS=300
Delivery priority:
DISCORD_WEBHOOK_URLDISCORD_BOT_TOKEN + DISCORD_CHANNEL_IDInstall LaunchAgent (does not edit OpenClaw core config):
bash "{baseDir}/scripts/install-launchd.sh" --interval 30 --load
Check status:
launchctl list | rg "com.openclaw.gateway-watchdog"
Use isolated job and keep messaging in one channel:
openclaw cron add \
--name "gateway-watchdog-internal" \
--cron "*/1 * * * *" \
--session isolated \
--message "Run bash {baseDir}/scripts/gateway-watchdog.sh and report state changes only." \
--announce \
--channel discord \
--to "channel:<your_channel_id>" \
--best-effort-deliver
Enable bounded restart:
export GW_WATCHDOG_ENABLE_RESTART=1
export GW_WATCHDOG_MAX_RESTART_ATTEMPTS=2
Safety constraints:
~/.openclaw/watchdogs/gateway-discord/state.json~/.openclaw/watchdogs/gateway-discord/backups/state-*.json~/.openclaw/watchdogs/gateway-discord/events.jsonlThe script rotates old backups and keeps recent history for rollback/debugging.