- Memory/disk pressure:
free -h,df -h / - Ollama service:
systemctl is-active ollama - Docker daemon:
docker system info | head -3 - Load average:
cat /proc/loadavg
- Failed SSH attempts:
sudo tail -20 /var/log/auth.log | grep Failed - UFW blocked:
sudo ufw show logging | tail -5 - Unusual processes:
ps aux | grep -E '(python|node|nc|ncat|socat|curl|wget)' | grep -v grep
- Gateway status:
openclaw status - Active sessions: check for stuck/orphaned sub-agents
- Cron job health:
openclaw cron list
Alert if:
- Memory usage > 90%
- Disk usage > 85%
- Load > 2x CPU cores for 5min
- Failed SSH from new IPs
- Ollama/Docker service down
- Suspicious process activity
Auto-fix if:
- Restart services if gracefully possible
- Kill orphaned sub-agent processes
- Rotate logs if oversized
Log to: /home/issac-asimov/.openclaw/workspace/memory/heartbeat-$(date +%Y-%m-%d).log