guardian-auto-healer

OpenClaw 7x24 watchdog & auto-healer. Monitors gateway health, memory usage, zombie sessions, and disk space every 5 minutes with automatic restart when stuck.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "guardian-auto-healer" with this command: npx skills add openlark/guardian-auto-healer

Guardian — OpenClaw 7x24 Watchdog & Auto-Healer

Overview

Deploy a lightweight watchdog that checks OpenClaw health every 5 minutes and auto-heals when problems are found. Runs as a cron job — zero manual intervention after setup. Use when the user asks to set up health monitoring, auto-healing, watchdog, or crash recovery for OpenClaw.

Triggers

"watchdog", "guardian", "auto-heal", "auto-restart", "health monitor", "7x24 monitor", "crash recovery", "memory monitor", "OOM guard".

Quick Start

Install and schedule with cron in one go:

  1. Copy the watchdog script to the workspace (one-time):

    Copy scripts/watchdog.py → ~/.openclaw/workspace/guardian/watchdog.py
    

    (Use cp -r / copy; adjust the destination as needed. Keep the guardian/ folder in workspace.)

  2. Schedule via cron (5-minute interval): Use the cron tool to create a recurring agentTurn job:

    {
      "schedule": { "kind": "every", "everyMs": 300000 },
      "payload": {
        "kind": "agentTurn",
        "message": "Run guardian watchdog: execute `python3 ~/.openclaw/workspace/guardian/watchdog.py`. Report issues only if gateway is down, memory exceeds threshold, or disk is low. Otherwise reply HEALTH_OK.",
        "timeoutSeconds": 60
      },
      "sessionTarget": "isolated",
      "name": "guardian:watchdog",
      "delivery": { "mode": "announce" }
    }
    
  3. Verify — after the first run, check logs:

    cat ~/.openclaw/logs/guardian.log     # macOS/Linux
    type %USERPROFILE%\.openclaw\logs\guardian.log   # Windows
    

What It Monitors

CheckThresholdAuto-Heal Action
Gateway aliveUnresponsive > 15sopenclaw gateway restart
Memory usageWarn > 500 MB, Kill > 1 GBRestart gateway on kill
Disk spaceFree < 1 GBAlert only (no auto-action)

Manual Run

To run a one-off check without waiting for cron:

python3 ~/.openclaw/workspace/guardian/watchdog.py

Logs

All checks are recorded to ~/.openclaw/logs/guardian.log with timestamps. Each run produces a delimited block like:

[2026-05-04 23:00:00] ============================
[2026-05-04 23:00:00] Guardian Watchdog check starting...
[2026-05-04 23:00:00] OK: Gateway is responsive.
[2026-05-04 23:00:00] OK: Memory usage 234 MB (500 MB warn, 1000 MB kill).
[2026-05-04 23:00:00] OK: Disk free space 45.2 GB.
[2026-05-04 23:00:00] RESULT: All systems healthy.
[2026-05-04 23:00:00] ============================

Managing the Cron Job

  • List jobs: openclaw cron list
  • Run now: openclaw cron run <job-id> (find id from list)
  • Stop: openclaw cron update <job-id> --enabled false
  • Remove: openclaw cron remove <job-id>

Troubleshooting

  • "openclaw CLI not found": The watchdog uses shutil.which("openclaw"). If the CLI is not in PATH, manually set the path in watchdog.py by editing find_openclaw_cli().
  • Restart fails: Gateway may need manual intervention. Check openclaw gateway status directly.
  • High memory but no restart: Memory threshold only triggers restart at >1 GB. Below that, only warns.
  • Windows encoding: The script writes logs in UTF-8. If reading logs produces garbled output, use chcp 65001 first.

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

Obsidian Cleaner

Automatically clean up loose images and attachments in Obsidian vault root, moving them to the Attachments folder. Trigger when user says "clean obsidian", "clean attachments", or "整理附件".

Registry SourceRecently Updated
General

tradealpha实时新闻

获取 TradeAlpha 实时新闻和语义检索结果。适用于用户提到 TradeAlpha 新闻、今日新闻、路透、彭博、Truth、国内资讯、研报快讯,或要求按主题、事件、公司、叙事检索相关新闻的场景。通过聊天向用户索取 token,并在当前会话中复用,不读取环境变量,不写入本地文件。

Registry SourceRecently Updated
General

Everclaw — Inference You Own

Open-source first AI inference — GLM-5 as default, Claude as fallback only. Own your inference forever via the Morpheus decentralized network. Stake MOR toke...

Registry SourceRecently Updated
General

Identitygram Signin

Sign in to IdentityGram by calling the /auth/signin endpoint.

Registry SourceRecently Updated