360 Secure SkillHub
360 安全技能中心

Clawdoctor

ClawDoctor 是一个 npm 命令行守护进程,用于监控 OpenClaw 网关进程、cron 任务、Agent 会话、鉴权失败和 token 成本;通过 Telegram 发送限流告警,并可经 systemctl 或 OpenClaw 命令重启网关。配置与事件分别保存在本地配置文件和 SQLite 中,自动修复与 Telegram 告警需付费授权。

relayplane
relayplane
热度 54.93
最近更新 2026-05-18 12:24:54
分类:自动化依赖:代码执行 / 读写文件 / 第三方 API应用场景:DevOps / 自动化脚本

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add turleydesigns-clawdoctor
Metadata
name
clawdoctor
description
Self-healing monitor for OpenClaw gateways, crons, and agent sessions. Use when you need to watch if OpenClaw is running, get Telegram alerts on failures, auto-restart the gateway, detect missed crons or stuck sessions, or monitor token costs. Install with `npm install -g clawdoctor`.
metadata
{"openclaw":{"requires":{"bins":["clawdoctor"]},"install":[{"id":"node","kind":"node","package":"clawdoctor","bins":["clawdoctor"],"label":"Install ClawDoctor (npm)"}]}}

ClawDoctor

Self-healing monitor for OpenClaw. Watches your gateway, crons, and agent sessions, sends Telegram alerts, and auto-fixes what it can.

Site: https://clawdoctor.dev
npm: https://www.npmjs.com/package/clawdoctor
GitHub: https://github.com/turleydesigns/clawdoctor

Install

npm install -g clawdoctor

Quick Start

# Interactive setup (Telegram bot token, chat ID, plan key)
clawdoctor init

# Start monitoring daemon
clawdoctor start

# Check health of all monitors
clawdoctor status

Commands

clawdoctor init              # Interactive setup
clawdoctor start             # Start monitoring daemon
clawdoctor start --dry-run   # Run without taking healing actions
clawdoctor stop              # Stop daemon
clawdoctor status            # Live health check of all monitors
clawdoctor log               # Show recent events from local database
clawdoctor log -n 100        # Show last 100 events
clawdoctor log -w GatewayWatcher -s critical  # Filter by watcher/severity
clawdoctor install-service   # Install as systemd user service

What It Monitors

Monitor What It Watches Interval
GatewayWatcher openclaw process running 30s
CronWatcher ~/.openclaw/state/cron-*.json for missed/failed crons 60s
SessionWatcher Agent session files for errors, aborts, stuck sessions 60s
AuthWatcher Gateway logs for 401/403/token expired patterns 60s
CostWatcher Session token costs — flags if >3x rolling average 5m

What It Fixes

Healer Action
ProcessHealer Restarts gateway via systemctl or openclaw gateway restart, then verifies
CronHealer Logs failure and includes manual rerun command in the alert

Pricing

Tier Price Monitors History Auto-fix Alerts
Watch Free 5 7 days ✗ Local only
Diagnose $9/mo 20 30 days ✗ ✅ Telegram
Heal $19/mo Unlimited 90 days ✅ ✅ Telegram

Alerts

Telegram alerts with rate limiting (max 1 per monitor per 5 minutes):

🔴 ClawDoctor Alert
Monitor: GatewayWatcher
Severity: critical
Message: openclaw process not found

Notes

  • Config stored at ~/.clawdoctor/config.json
  • Events stored in SQLite at ~/.clawdoctor/events.db
  • Free tier: 5 monitors, local alerts only, no auto-fix
  • Paid tiers activated via license key from https://clawdoctor.dev