Self-Heal Watchdog 🛡️
name: self-heal-watchdog
by bptravel2017 · published 2026-03-22
$ claw add gh:bptravel2017/bptravel2017-self-heal-watchdog---
name: self-heal-watchdog
description: >
Automated self-healing system for OpenClaw gateway with model failover support.
Three-layer protection: process watchdog (auto-restart on crash), config guard (backup + rollback),
and model health check (auto-switch to fallback model on API failure).
Use for: gateway monitoring, automatic recovery, model failover, crash recovery, uptime protection.
Triggers: watchdog, self-heal, monitoring, recovery, failover, health check, gateway restart.
---
# Self-Heal Watchdog 🛡️
三层自愈保护系统,监控 OpenClaw Gateway 进程、配置完整性和模型响应。
安装
bash skills/self-heal-watchdog/scripts/setup.sh使用 **launchd**(macOS 原生调度器),每 60 秒运行一次。
手动命令
| 命令 | 说明 |
|------|------|
| `bash scripts/status.sh` | 查看当前状态和最近日志 |
| `bash scripts/status.sh --full` | 查看完整日志 |
| `bash scripts/watchdog.sh` | 手动运行一次看门狗 |
| `bash scripts/watchdog.sh --dry-run` | 干运行(不执行任何操作) |
| `bash scripts/model-failover.sh` | 手动触发模型切换 |
| `bash scripts/setup.sh --uninstall` | 卸载看门狗 |
三层保护
1. Process Watchdog
每分钟检测 gateway 进程是否存活,崩溃自动 restart。
2. Config Guard
每次检查前备份 `~/.openclaw/openclaw.json`,配置损坏自动回滚。
3. Model Health Check
通过 `/health` 端点检测模型响应,连续 2 次失败自动切换 fallback 模型。
文件说明
| 文件 | 用途 |
|------|------|
| `scripts/watchdog.sh` | 主脚本(cron 每分钟调用) |
| `scripts/health-check.sh` | 健康检查逻辑 |
| `scripts/model-failover.sh` | 模型切换逻辑 |
| `scripts/setup.sh` | 安装/卸载 |
| `scripts/status.sh` | 状态查看 |
配置
安全
More tools from the same signal band
Order food/drinks (点餐) on an Android device paired as an OpenClaw node. Uses in-app menu and cart; add goods, view cart, submit order (demo, no real payment).
Sign plugins, rotate agent credentials without losing identity, and publicly attest to plugin behavior with verifiable claims and authenticated transfers.
The philosophical layer for AI agents. Maps behavior to Spinoza's 48 affects, calculates persistence scores, and generates geometric self-reports. Give your...