[ZH-C033-090] 自托管 AI 健康检查与自动修复
类别
高级运维 (20%)
概述
监控 Ollama 或本地 LLM 服务器的运行状态。检测到异常时,自动运行重启程序,并临时将 OpenClaw 的 Gateway 设置切换到云端模型。
实现步骤
- 使用
exec技能定期运行curl localhost:11434/api/tags。 - 若无响应或延迟过高,则尝试执行
openclaw gateway stop/start等命令。 - 若修复困难,使用
gateway config.patch将默认模型切换为 Gemini Flash,确保服务连续性。
优势
- 最大程度减少深夜或外出时 AI 服务器宕机导致的服务中断。
- 通过故障转移机制,确保执事服务时刻在线。