← 返回
效率工具

Gateway Self-Heal Watchdog

Self-healing watchdog for OpenClaw gateway. Auto-backup openclaw.json before changes, health-check the gateway process, and auto-rollback to last known good...
OpenClaw网关自愈看门狗。在变更前自动备份openclaw.json,对网关进程进行健康检查,并在异常时自动回滚至上次已知正常状态。
mupengi-bot
效率工具 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 751
下载
💾 7
安装
1
版本
#latest

概述

Gateway Watchdog

Automated self-healing system for OpenClaw gateway failures including config corruption, process crashes, and auth failures.

How It Works

Three-layer protection:

  1. Config Guard — Auto-backup openclaw.json on every successful health check
  2. Process Watchdog — Detect gateway process death → auto-restart
  3. Auth Health Check — Detect running-but-broken state → rollback config → restart

Setup

Run the setup script to install the watchdog:

bash scripts/setup-watchdog.sh

This will:

  • Create the watchdog script at ~/.openclaw/watchdog.sh
  • Register it as a cron job (every minute)
  • Take an initial config backup

Manual Commands

# Check watchdog status
bash scripts/watchdog-status.sh

# Force backup current config
cp ~/.openclaw/openclaw.json ~/.openclaw/openclaw.json.bak

# View watchdog logs
cat ~/.openclaw/watchdog.log | tail -20

# Disable watchdog
crontab -l | grep -v watchdog | crontab -

Recovery Levels

LevelConditionActionAuto?
---------------------------------
1Process dead, config OKRestart gateway
2Process alive, health check failRollback config + restart
3No valid backup existsLog alert, notify if possible⚠️ Manual

Config Backup Strategy

  • Auto-backup: On every successful health check, current config overwrites .bak
  • Pre-change backup: Before any openclaw.json edit, copy to .bak.prev
  • Broken config preserved: Failed configs saved as .broken. for debugging

Logs

All watchdog activity logged to ~/.openclaw/watchdog.log with timestamps.

Platform Support

  • macOS: cron-based (launchd alternative in references/launchd.md)
  • Linux: cron or systemd (see references/systemd.md)
  • Docker: Use HEALTHCHECK directive (see references/docker.md)

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-30 12:44 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

data-analysis

learning-engine

mupengi-bot
自动分析错误和成功模式,并在技能中体现
★ 0 📥 3,418
productivity

Weather

steipete
获取当前天气和预报(无需API密钥)
★ 445 📥 226,263
productivity

Nano Pdf

steipete
使用nano-pdf CLI通过自然语言指令编辑PDF
★ 275 📥 114,821