System Health — v3.0 (2026-04-06)
Local system monitoring skill. No LLM calls. Runs via system crontab.
Quick Usage
# Run now
bash ~/.openclaw/workspace/skills/system-health/scripts/health-check.sh
# See latest report
cat ~/.openclaw/workspace/logs/health-latest.md
# See history
tail -20 ~/.openclaw/workspace/logs/health-history.log
Checks
| # | Check | Critical if | Warning if |
|---|---|---|---|
| 1 | Gateway | Not responding on localhost:18789 | — |
| 2 | PM2 / deepseek-daemon | daemon not online | PM2 missing |
| 3 | Docker | daemon unavailable or unhealthy containers | — |
| 4 | Disk + inode | ≥95% full/inode | ≥85% full/inode |
| 5 | RAM | ≥90% used | ≥80% used |
| 6 | Cert expiry | <7 days remaining (daily gate at 03:xx) | — |
Cron Setup
# Every 5 minutes
(crontab -l 2>/dev/null | grep -v 'health-check.sh'
echo '*/5 * * * * /usr/bin/env bash /home/irtual/.openclaw/workspace/skills/system-health/scripts/health-check.sh >> /home/irtual/.openclaw/workspace/logs/health-cron.log 2>&1'
) | crontab -
Alerting
When status = CRITICAL, the script calls:
openclaw system event --text "🔴 Health Check CRITICAL: ..." --mode now
This wakes the agent and routes the alert via configured channels.
Adding a Check
- Add a
check_XXXfunction inscripts/health-check.sh - Register it in the "Run checks" section
- Document in the table above
Pattern:
check_XXX() {
# logic
# CRITICAL+=("❌ ...") or WARNINGS+=("⚠️ ...") or OK_ITEMS+=("✅ ...")
}
Files
scripts/health-check.sh— main script (runs from cron)~/.openclaw/workspace/logs/health-latest.md— latest report (markdown)~/.openclaw/workspace/logs/health-history.log— append-only history (trimmed to last 1000 lines)~/.openclaw/workspace/logs/health-cron.log— cron execution output
