← 返回
未分类

Auto-Watchdog

Automatic health monitoring and self-healing for OpenClaw agents. Monitors cron jobs, processes, disk usage, and API health. Auto-restarts crashed services a...
为OpenClaw代理提供自动健康监控与自愈功能,监测定时任务、进程、磁盘使用率及API状态,自动重启崩溃服务...
peti0402
未分类 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 306
下载
💾 0
安装
1
版本
#latest

概述

Auto-Watchdog 🐕

Your OpenClaw setup runs 24/7. But what watches the watchers?

Auto-Watchdog monitors everything and fixes what it can — silently. You only hear about real problems.

Features

1. Cron Health Monitor

Checks all cron jobs every heartbeat:

  • consecutiveErrors > 0 → immediate alert
  • Job not running when expected → alert
  • Disabled jobs piling up → cleanup recommendation

2. Process Guardian

Monitors critical processes by log freshness (not just PID):

  • Log file not updated in X minutes → kill + restart
  • Works with any Node.js process
  • Configurable per-process thresholds

3. Disk Monitor

  • Log files growing too large → auto-rotate
  • Workspace size alerts
  • Temp file cleanup

4. Gateway Health

  • Checks openclaw gateway status every heartbeat
  • Auto-restart if down (via Task Scheduler or systemd)

5. Silent by Default

  • Everything OK → no output (HEARTBEAT_OK)
  • Issue found → targeted alert to your chat
  • No spam. No unnecessary reports.

Setup

Add to HEARTBEAT.md:

## 🔍 Health Check (silent = good)

### Crons
- `cron list` → check consecutiveErrors > 0 → alert
- Frequent crons not running >2 hours → alert

### Processes
- Check [your process] log freshness < [X] minutes
- If stale → restart and alert

### Gateway
- `openclaw gateway status` → alert if down

### Disk
- Check log sizes > 10MB → rotate
- Check workspace size > 1GB → alert

For Windows (Task Scheduler Guardian):

Create a VBS wrapper for zero-flash execution:

' guardian-silent.vbs — zero flash process monitor
Set oShell = CreateObject("WScript.Shell")
oShell.Run "powershell.exe -NonInteractive -WindowStyle Hidden -ExecutionPolicy Bypass -File ""C:\path\to\guardian.ps1""", 0, True

Register as Task Scheduler job running every 1-5 minutes.

For Linux (systemd):

# /etc/systemd/system/openclaw-watchdog.service
[Service]
ExecStart=/usr/bin/node /path/to/guardian.js
Restart=always
RestartSec=60

Philosophy

> Monitor by output freshness, not PID.

> A process can be "alive" but stuck. Check its log timestamp.

> Fix first, alert second.

> If you can restart it automatically, do it. Only alert for things that need human intervention.

> Silent = healthy.

> No news is good news. Only speak up when something breaks.

Production-Tested

Built for a 24/7 autonomous trading system with:

  • 5 competing AI agents
  • 20+ cron jobs
  • Strategy researcher running 23h/day
  • Zero downtime over weeks of operation

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-05-12 05:50 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

ai-intelligence

Trading Tournament

peti0402
在OKX上运行自主多智能体交易竞赛。5个AI智能体使用实时市场数据竞争,通过进化选择每日替换表现不佳者,交易所集成...
★ 1 📥 969

OKX Competition Manager

peti0402
5个AI交易代理在OKX Demo(实时价格)竞争。每日淘汰失败者的进化赛制,交易所级止损保护资金。
★ 0 📥 258

Anti-Amnesia Agent

peti0402
完整的防遗忘系统,为 OpenClaw 代理设计。通过结构化状态文件、自动会话保存和健康监控,防止跨会话上下文丢失。
★ 0 📥 298