gateway-watchdog
Monitor 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.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/jonathanjing/openclaw-gateway-watchdog-skillGateway Watchdog (Discord)
Discord-first watchdog for OpenClaw gateway incidents.
π οΈ Installation
1. Ask OpenClaw (Recommended)
Tell OpenClaw: "Install the gateway-watchdog skill." The agent will handle the installation and configuration automatically.
2. Manual Installation (CLI)
If you prefer the terminal, run:
clawhub install gateway-watchdog
Isolation model
- Watchdog data is isolated under
~/.openclaw/watchdogs/gateway-discord/. - No edits to
openclaw.jsonare required. - Default mode is read-only monitoring (
GW_WATCHDOG_ENABLE_RESTART=0). - Automatic restart is opt-in and bounded by max attempts.
Files in this skill
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.
Health checks
The watchdog checks:
openclaw gateway status --json
openclaw health --json --timeout <ms>
Pass criteria:
- gateway runtime is
running - RPC probe is healthy (when present)
- health snapshot returns successfully
Failure classes:
runtime_stoppedrpc_probe_failedhealth_unreachableauth_mismatchconfig_invalid
Quick start (manual run)
bash "{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_ID
macOS background mode (LaunchAgent)
Install 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"
OpenClaw cron mode (internal path)
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
Auto-recovery policy (opt-in)
Enable bounded restart:
export GW_WATCHDOG_ENABLE_RESTART=1
export GW_WATCHDOG_MAX_RESTART_ATTEMPTS=2
Safety constraints:
- restart only after failure threshold is met
- max attempts enforced per incident window
- no reinstall or destructive mutation
Backup and audit artifacts
Metadata
Not sure this is the right skill?
Describe what you want to build β we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-jonathanjing-openclaw-gateway-watchdog-skill": {
"enabled": true,
"auto_update": true
}
}
}Related Skills
glass2claw
Ray-Ban glasses β voice command β WhatsApp β OpenClaw auto-routes your photo into the right database. Hands-free life logging.
openclaw-dashboard
Real-time operations dashboard for OpenClaw. Monitors sessions, costs, cron jobs, and gateway health. Use when installing the dashboard, starting the server, adding features, updating `api-server.js` routes, or changing `agent-dashboard.html`. Includes language toggle (EN/δΈζ), watchdog 24h uptime bar, and cost analysis.
rag-eval
Evaluate your RAG pipeline quality using Ragas metrics (faithfulness, answer relevancy, context precision).
skill-trust-auditor
Audit a ClawHub skill for security risks BEFORE installation.
openclaw-tally
Tokens tell you how much you paid. Tasks tell you what you got. Tally tracks every OpenClaw task from start to finish β cost, complexity, and efficiency score.