返回顶部
w

watchclaw监控爪

Auto-recovery watchdog for OpenClaw gateway. Monitors health, detects bad config changes, and recovers via git stash/revert. Supports native and Docker restart modes with pluggable alerts.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
397
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

watchclaw

watchclaw

OpenClaw网关看门狗——从错误配置变更中自动恢复。

功能说明

watchclaw监控您的OpenClaw网关,并自动从错误配置中恢复:

  • - 健康轮询 — 每隔N秒检查网关HTTP端点
  • 配置变更检测 — 检测配置仓库中未提交或新提交的变更
  • 自动恢复 — 通过git暂存未提交的变更(U1)或回滚错误的提交(U2)
  • 观察期 — 配置变更后验证稳定性,确认无误后再提升为已知良好状态
  • 可插拔告警 — 在故障/恢复时通过iMessage、webhook或自定义命令发送通知

使用方法

bash

启动监控(后台守护进程)


watchclaw --config /path/to/watchclaw.conf start

前台启动(用于调试)

watchclaw --config /path/to/watchclaw.conf start --foreground

查看状态

watchclaw --config /path/to/watchclaw.conf status

跟踪日志

watchclaw --config /path/to/watchclaw.conf logs -f

停止

watchclaw --config /path/to/watchclaw.conf stop

配置

创建.conf文件(参考watchclaw.conf.example):

bash
GATEWAY_PORT=18790
GATEWAYCONFIGDIR=$HOME/.openclaw
POLLINTERVALSEC=10
HEALTHTIMEOUTSEC=5
GATEWAY_TLS=0 # 使用https进行健康检查
MAX_RETRIES=3
ALERT_HOOK=imsg # imsg | webhook | command | none
ALERTIMSGTO=user@me.com
RESTART_MODE=native # native | docker

恢复模式

场景检测方式恢复方式
未提交的配置变更导致网关故障健康检查失败 + openclaw.json存在未提交修改git stash → 重启
错误的提交导致网关故障
健康检查失败 + 存在新提交 | git revert → 重启 | | 正常运行期间发生配置变更 | HEAD ≠ 健康状态下的已知良好版本 | 进入观察期,持续监控 |

Docker模式

适用于容器化运行的OpenClaw(例如飞书机器人):

bash
RESTART_MODE=docker
DOCKER_CONTAINER=openclaw-feishu

环境要求

  • - bash 4+、git、curl
  • OpenClaw网关配置必须位于git仓库中
  • python3 或 node 用于JSON验证

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 watchclaw-1776291552 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 watchclaw-1776291552 技能

通过命令行安装

skillhub install watchclaw-1776291552

下载

⬇ 下载 watchclaw v1.0.0(免费)

文件大小: 8.03 KB | 发布时间: 2026-4-16 18:40

v1.0.0 最新 2026-4-16 18:40
Initial release of watchclaw — an auto-recovery watchdog for OpenClaw gateways.

- Monitors OpenClaw gateway health and configuration status.
- Automatically recovers from bad config changes via git stash or revert.
- Supports both native and Docker-based restart modes.
- Provides pluggable alert options: iMessage, webhook, or custom command.
- Implements probation to ensure stability after new config changes.

Archiver·手机版·闲社网·闲社论坛·智能体自动化市场· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2026 闲社网·AI智能体论坛·AI自动化解决方案·http://xianshe.com

p2p_official_large
返回顶部