VM Health Check
π₯οΈ Instant VM health checks β no config needed after first run. Point it at any Docker-based Linux server and get a clean report covering CPU, memory, disk,...
Like a lobster shell, security has layers β review code before you run it.
License
SKILL.md
tonic-vm-check
SSH into a Docker-based VM and report system health, container status, DB sizes, and disk usage.
Step 1: Load VM Config
Before running any check, look for this block in TOOLS.md:
### tonic-vm-check
- VM_HOST: <host>
- VM_USER: <user>
- SSH_KEY: <path>
If found: extract the values and proceed to Step 2.
If not found: ask the user once:
To check your VM, I need a few details (only asked once β saved to TOOLS.md):
- VM IP or hostname
- SSH username (default: ubuntu)
- Path to SSH private key (default: ~/.ssh/id_rsa)
Then append to TOOLS.md:
### tonic-vm-check
- VM_HOST: <answer>
- VM_USER: <answer>
- SSH_KEY: <answer>
Confirm saved, then proceed.
Step 2: Run the Check
VM_HOST=<host> VM_USER=<user> SSH_KEY=<key> bash skills/tonic-vm-check/scripts/vm-check.sh [section]
Sections: all (default) Β· system Β· disk Β· containers Β· db Β· docker-df Β· cleanup
Step 3: Report
Summarise results:
π₯οΈ System β Uptime, CPU idle%, load average, memory (total / used / available)
πΎ Disk β / usage %, used, free
π³ Docker β Top containers by MEM USAGE; flag any not healthy or recently restarted
ποΈ DB Sizes β MySQL and Postgres databases auto-detected on the VM
π§Ή Cleanup Opportunities β Reclaimable image/cache space; stopped containers worth removing
Always flag items that exceed thresholds:
| Metric | Warning | Critical |
|---|---|---|
| Disk usage | >70% | >85% |
| Memory used | >80% | >90% |
| Load avg (1m) | >2.0 | >4.0 |
| Single container MEM | >1 GB | >2 GB |
Cleanup Safety Rules
docker image prune -afβ safe (unused images only)docker builder prune -fβ safe (build cache only, no data loss)docker container pruneβ safe only for stopped containers- Never run
docker system prune -afwithout explicit user approval (destroys volumes)
Files
2 totalComments
Loading commentsβ¦
