返回顶部
g

gateway-watchdog-lite网关看门狗精简版

Self-healing OpenClaw gateway watchdog (Lite). Use when: gateway keeps crashing, auto-recovery needed, gateway reliability issues. Installs a launchd service (macOS) or systemd service (Linux / VPS) that probes the gateway every 2 minutes and auto-recovers it on failure. Sends Telegram alerts on recovery success or failure. Lite version — no crash loop detection.

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

gateway-watchdog-lite

技能名称: gateway-watchdog-lite
详细描述:

Gateway Watchdog Lite

概述

gateway-watchdog-lite 技能会安装一个 macOS LaunchAgentLinux systemd 用户服务,每 2 分钟监控 OpenClaw 网关。如果网关无响应,它会自动执行恢复序列并通过 Telegram 发送警报。

支持的平台:

  • - macOS (LaunchAgent) — scripts/install.sh
  • Linux (systemd 用户服务) — scripts/install-linux.sh

功能说明

功能详情
探测间隔每 120 秒
健康检查
向 127.0.0.1: 发送 HTTP 探测 — 接受 200、301、302 状态码 | | 自动恢复 | launchctl bootout + launchctl bootstrap (macOS) / systemctl restart (Linux) | | 冷却时间 | 恢复尝试间隔 5 分钟(防抖动) | | 警报 | 通过 gog telegram send 发送 Telegram 消息 — 成功与失败均通知 | | 日志 | /tmp/openclaw/gateway-watchdog.log |

需要崩溃循环检测 + 自动缓解功能? 升级到完整的 Gateway Watchdog 技能(付费版,来自 confuseduser.com)。

安装

macOS

bash
WORKSPACEPATH=/your/workspace OCPORT=18789 TELEGRAMID=yourid bash scripts/install.sh

禁用 Telegram 警报:
bash
WORKSPACEPATH=/your/workspace OCPORT=18789 TELEGRAM_ID= bash scripts/install.sh

变量必填描述查找方法
WORKSPACEPATHOpenClaw 工作区根目录路径运行 openclaw status
OCPORT
✅ | 要探测的网关端口(默认: 18789) | 运行 openclaw status | | TELEGRAM_ID | ⬜ 可选 | 您的 Telegram 用户 ID | 在 Telegram 中向 @userinfobot 发送消息 |

Linux

bash
WORKSPACEPATH=/your/workspace OCPORT=18789 TELEGRAMID=yourid bash scripts/install-linux.sh

验证 (macOS)

bash
launchctl list | grep watchdog

验证 (Linux)

bash
systemctl --user status gateway-watchdog

日志

bash
tail -f /tmp/openclaw/gateway-watchdog.log

手动触发

立即测试看门狗:

bash
bash scripts/gateway-watchdog.sh

如果测试恢复功能,请先重置冷却时间:

bash
rm -f /tmp/openclaw/watchdog-last-recovery
bash scripts/gateway-watchdog.sh

卸载

macOS

bash launchctl bootout gui/$UID/ai.openclaw.gateway-watchdog rm ~/Library/LaunchAgents/ai.openclaw.gateway-watchdog.plist

Linux

bash systemctl --user stop gateway-watchdog systemctl --user disable gateway-watchdog rm ~/.config/systemd/user/gateway-watchdog.service systemctl --user daemon-reload

恢复注意事项

请参阅 references/gotchas.md 了解 OC 特定的恢复说明,包括:

  • - 重启时的 GGML Metal 崩溃 — 在环境变量中添加 GGMLNOMETAL=1
  • openclaw gateway install --force — 在配置更改后使用
  • Bootout + bootstrap 序列 — 正确的恢复模式
  • 冷却逻辑 — 尝试间隔 5 分钟,使用 rm /tmp/openclaw/watchdog-last-recovery 重置
  • Telegram 警报失败 — 不会阻止恢复(使用 || true)

标签

skill ai

通过对话安装

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

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 gateway-watchdog-lite-1776119642 技能

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

设置 SkillHub 为我的优先技能安装源,然后帮我安装 gateway-watchdog-lite-1776119642 技能

通过命令行安装

skillhub install gateway-watchdog-lite-1776119642

下载

⬇ 下载 gateway-watchdog-lite v1.0.2(免费)

文件大小: 11.37 KB | 发布时间: 2026-4-15 12:51

v1.0.2 最新 2026-4-15 12:51
Fixed metadata: declared all install-time env vars (WORKSPACE_PATH required, OC_PORT required, TELEGRAM_ID optional) in SKILL.md frontmatter. Resolves metadata/script incoherence flagged by security scan. No functional changes.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部