监控 OpenClaw Gateway 运行状态,支持多通道检测和自动恢复。
bash
bash /path/to/openclaw-watchdog/scripts/watchdog.sh [interval]
# interval: 检测间隔(秒),默认 300(5分钟)
ini
[Unit]
Description=OpenClaw Watchdog
After=network-online.target
[Service]
ExecStart=/bin/bash /path/to/openclaw-watchdog/scripts/watchdog.sh 300
Restart=always
RestartSec=10
[Install]
WantedBy=default.target
部署命令:
bash
systemctl --user enable openclaw-watchdog.service
systemctl --user start openclaw-watchdog.service
变量默认值说明LOG_FILE``/tmp/openclaw_watchdog.log日志文件路径PID_FILE``/tmp/openclaw_gateway.pidGateway PID 文件MAX_RESTARTS``2最大重启次数RESTART_WINDOW``600重启窗口(秒)OPENCLAW_PORT``18789Gateway 端口
/tmp/openclaw_watchdog.log/tmp/openclaw_gateway.log/tmp/openclaw_feishu_paused/tmp/openclaw_wecom_paused/tmp/openclaw_weixin_paused/tmp/openclaw_proxy_disabled通道错误关键词说明飞书feishu.*error, lark.*error, session.*expiredsession 过期需等待企业微信wecom.*error, wechat.*work.*error服务端错误微信errcode.*-14, session.*expired暂停 60 分钟自动恢复