Install
openclaw skills install auto-heal自动监控 OpenClaw 状态,每60秒检测并自动修复卡死、无响应和内存超限问题,确保服务稳定运行。
openclaw skills install auto-heal全天自动监控 OpenClaw 状态,检测到卡死自动修复。
当用户询问以下问题时激活:
logs/auto-heal.logstate.json# 前台运行
node ~/.openclaw/workspace/skills/auto-heal/monitor.js
# 后台运行
nohup node ~/.openclaw/workspace/skills/auto-heal/monitor.js > /dev/null 2>&1 &
# 编辑 crontab
crontab -e
# 添加每5分钟检查一次
*/5 * * * * cd ~/.openclaw/workspace/skills/auto-heal && node monitor.js --check-once
openclaw health check
编辑 ~/.openclaw/openclaw.json:
{
"skills": {
"auto-heal": {
"enabled": true,
"checkInterval": 60,
"autoFix": true,
"memoryThreshold": 80,
"notifyChannel": "feishu"
}
}
}
启动监控
↓
每60秒执行健康检查
↓
检查 Gateway 状态
检查 Agent 会话
检查内存使用
↓
发现问题?
↓ 是
自动修复
↓
记录日志
↓
等待下一次检查
# 实时查看日志
tail -f ~/.openclaw/workspace/skills/auto-heal/logs/auto-heal.log
# 查看最近100行
tail -n 100 ~/.openclaw/workspace/skills/auto-heal/logs/auto-heal.log
cat ~/.openclaw/workspace/skills/auto-heal/state.json
openclaw CLI 可用