Three-tier system health monitoring for OpenClaw
bash
clawhub install system-healthcheck
Or manually:
bash
git clone https://github.com/your-username/system-healthcheck.git ~/.openclaw/skills/system-healthcheck
bash
cd ~/.openclaw/skills/system-healthcheck
python scripts/l1_fast_check.py
bash
python scripts/l2_hourly_check.py
bash
cat templates/crontab_example.txt
# Copy and edit crontab
crontab -e
bash
python scripts/heartbeat.py
Edit config/default_config.yaml:
yaml
# Internationalization
i18n:
auto_detect: true # Auto-detect system language
# locale: zh-CN # Or specify manually
# Thresholds
thresholds:
disk_warning: 80 # Disk warning (%)
disk_critical: 95 # Disk critical (%)
memory_warning_mb: 500 # Memory warning (MB)
log_size_mb: 100 # Log size warning (MB)
# Heartbeat
heartbeat:
enabled: true
work_hours_start: 9
work_hours_end: 18
quiet_on_ok: true # Silent when all OK
text
🦞 System Health Check · 2026-03-23 09:00:00
✅ Disk Usage: 45% (threshold: 80%)
✅ Memory Usage: 1.2GB / 8GB
✅ Cron Service: Running
✅ OpenClaw Gateway: Healthy
✅ Log Files: 12MB
━━━━━━━━━━━━━━━━━━━━━━━━
✅ All checks passed
Duration: 1.2s
text
HEARTBEAT_OK
text
🦞 Heartbeat Check · 2026-03-23 14:30:00
⚠️ Disk Usage: 85% (exceeds 80%)
✅ Memory Usage: 2.1GB / 8GB
...
ScriptPurposeFrequencyl1_fast_check.pyDefinition files checkBefore conversationsl2_hourly_check.pySystem health checkHourly (cron)l3_daily_audit.pyComprehensive auditDaily 08:00 (cron)heartbeat.pyWork-hours heartbeatEvery 30min (cron)
bash
# JSON output
python scripts/l2_hourly_check.py --json
# Quiet mode (exit code only)
python scripts/l2_hourly_check.py --quiet
# Force output (heartbeat)
python scripts/heartbeat.py --force
0: All checks passed1: One or more checks failedSupported languages:
en - Englishzh-CN - 简体中文Auto-detected from system locale. Override with:
bash
export OPENCLAW_LOCALE=zh-CN
python scripts/l2_hourly_check.py
rich for colorful output, pyyaml for config)MIT
Contributions welcome! Please read CONTRIBUTING.md first.