Install
openclaw skills install @jonathanjing/openclaw-gateway-watchdog-skillMonitor the OpenClaw Gateway plus configured Spark, Local API Hub, and Dashboard loopback health endpoints with a read-only watchdog state machine, local state files, cooldown dedupe, and optional Discord alerts on macOS. Use for explicitly configured foreground checks, cron execution, LaunchAgent installation, recovery notification, and low-noise incident reporting; it does not rewrite OpenClaw config or restart services.
openclaw skills install @jonathanjing/openclaw-gateway-watchdog-skillDiscord-first watchdog for OpenClaw gateway incidents.
Tell OpenClaw: "Install the gateway-watchdog skill." Loading a LaunchAgent or configuring Discord delivery remains an explicit operator action.
If you prefer the terminal, run:
openclaw skills install @jonathanjing/openclaw-gateway-watchdog-skill
~/.openclaw/watchdogs/gateway-discord/.openclaw.json are required.openclaw.json, run doctor --fix, promote baselines, or restart services.config.env is parsed as data using an allowlist; it is never sourced or executed. For Spark only, the script may read the single SPARK_API_TOKEN value from ~/.openclaw/.env when that token is not already configured.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.Every run performs these checks:
openclaw gateway status --json
openclaw health --json --timeout <ms>
curl "${SPARK_API_URL:-http://127.0.0.1:17070}/status"
curl "${LOCAL_API_URL:-http://localhost:3456}/health"
curl "http://localhost:${DASHBOARD_PORT:-18793}/health"
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
~/.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.