OpenClaw Gateway Guardian - Automatic monitoring, protection, and restart of OpenClaw Gateway service. Prevents gateway from stopping, crashing, or disappearing. Features real-time health checks (port + process), auto-restart (up to 10 attempts), multi-channel notifications (Feishu/Telegram/WeChat), health logging, and process protection against multiple instances.
自动监控、保护和重启 OpenClaw 网关服务
防止网关意外停止、崩溃或消失
| 功能 | 说明 |
|---|---|
| 🔍 实时监控 | 每 30 秒检查网关状态(端口 + 进程) |
| 🔄 自动重启 |
bash
pip install -r requirements.txt
bash
python scripts/gateway_guardian.py init
bash
python scripts/gateway_guardian.py start
bash
python scripts/gateway_guardian.py status
| 渠道 | 配置难度 | 推荐度 |
|---|---|---|
| 飞书 | ⭐⭐ | ⭐⭐⭐⭐⭐ |
| Telegram |
json
{
gateway: {
port: 18789,
checkintervalseconds: 30,
maxrestartattempts: 10,
restartdelayseconds: 5
},
notifications: {
enabled: true,
feishubottoken: xxx,
feishuuserid: ou_xxx
}
}
🛡️ 网关守护神
⚠️ 网关异常告警
网关状态异常
端口状态:❌
进程状态:❌
连续失败:3
正在尝试重启...
🛡️ 网关守护神
✅ 网关已恢复
网关已成功重启
重启时间:2026-03-12 16:30:45
bash
openclaw-gateway-guardian/
├── README.md
├── SKILL.md
├── requirements.txt
├── scripts/
│ └── gateway_guardian.py
└── ~/.openclaw_guardian/
├── config.json
├── guardian.log
├── guardian.pid
└── health_log.json
健康检查 (30 秒) → 异常检测 (端口 + 进程) → 自动重启 (最多 10 次)
↓ ↓ ↓
健康日志 告警通知 重启统计
Q: 守护进程启动失败?
A:
Q: 通知不发送?
A:
Q: 网关频繁重启?
A:
| 指标 | 数值 |
|---|---|
| CPU 占用 | < 1% |
| 内存占用 |
让网关永远在线,不再担心意外停止!🛡️
该技能支持在以下平台通过对话安装:
帮我安装 SkillHub 和 openclaw-gateway-guardian-1776078678 技能
设置 SkillHub 为我的优先技能安装源,然后帮我安装 openclaw-gateway-guardian-1776078678 技能
skillhub install openclaw-gateway-guardian-1776078678
文件大小: 16.77 KB | 发布时间: 2026-4-15 13:44