dotmd
// Config Record

>System Health Monitor

HEARTBEAT.md for periodic system health checks — disk space, backups, SSL certs, service status, and smart alerts.

author:
dotmd Team
license:CC0
published:Feb 20, 2026
// Installation

>Add this file to your project repository:

  • OpenClaw
    HEARTBEAT.md
// File Content
HEARTBEAT.md
1# System Health Monitor
2
3Run these checks periodically. Report only when something needs attention.
4
5**Schedule:** every 6h (disk, containers, load) · daily 08:00 (backups, certs, digest) · weekly Monday (trends)
6**Alerts:** Discord DM. Hold non-critical during 22:00–07:00.
7
8---
9
10## Disk Space
11
12```bash
13df -h / /mnt 2>/dev/null | awk 'NR>1 {print $6, $5, $4}'
14```
15
16⚠️ >80% used · 🔴 >90% used · If tight, check `docker system df`
17
18## Docker Containers
19
20```bash
21docker ps -a --format '{{.Names}}\t{{.Status}}' | sort
22```
23
24Flag anything not "Up." Watch for restart loops via `docker inspect --format='{{.RestartCount}}'`.
25
26Key services: `openclaw-gateway`, `caddy`, `postgres` <!-- customize -->
27
28## System Load
29
30```bash
31uptime && free -h
32```
33
34⚠️ 15min load avg > CPU count · ⚠️ Available RAM < 500MB
35On Raspberry Pi: `vcgencmd measure_temp` — warn >75°C
36
37## Backup Freshness
38
39```bash
40ls -lt /path/to/backups/ | head -3
41```
42
43⚠️ Last backup >36h ago · 🔴 >72h ago · Sanity-check file sizes (not zero)
44
45## SSL Certificates
46
47```bash
48for domain in example.com api.example.com; do
49 echo | openssl s_client -connect "$domain:443" -servername "$domain" 2>/dev/null \
50 | openssl x509 -noout -enddate 2>/dev/null | sed "s/notAfter=/$domain: /"
51done
52```
53
54⚠️ <14 days · 🔴 <7 days
55
56## Digest Format
57
58All green: "✅ Systems nominal. Disk 62%, containers up, backup 4h ago, certs 58d."
59
60Something wrong: "⚠️ Disk 84% on /mnt — `docker system prune` frees ~4GB. Rest green."