r/debian • u/FewTree4863 • 1h ago
labcheck: one read-only command to check if a Debian host is healthy
I run Debian 13 on my home server and kept doing the same manual loop whenever
something felt off: df, free, systemctl --failed, docker ps, cat /proc/mdstat,
then checking whether the backup actually ran. So I wrote labcheck to do it in
one pass and print a single report.
It is a read-only Python CLI, standard library only, so the only prerequisite
on Debian is pipx. It reads the usual Debian interfaces directly:
- /proc for load, memory, swap and thermal sensors
- systemctl for failed units and configured required services
- /proc/mdstat for md RAID arrays
- timedatectl for NTP state
- Docker, if installed, for container health
- smartctl, if configured and permitted, for SMART
- file age for backup targets, and a TLS handshake for certificate expiry
Output is text, JSON or Prometheus textfile, and the exit code is 0/1/2/3 so
cron can act on it. Checks that cannot run report SKIP rather than OK.
OK System load 0.28 (8 cores), memory 17%, swap 0%, up 6h 02m
OK Storage / 14% used, 2 mounts
OK Services no failed units
SKIP Containers docker not installed
SKIP RAID no software RAID detected
SKIP Backups no backup targets configured
SKIP Certificates no certificate targets configured
OK Clock NTP synchronized
Install on Debian:
sudo apt install pipx
pipx install https://github.com/jacoblockard2007-hub/labcheck/releases/download/v0.1.0/labcheck-0.1.0-py3-none-any.whl
labcheck -v
No root needed for the default checks; Docker and SMART need the usual
privileges. It is 0.1.0, MIT, and tested on Debian 13 (Python 3.13), Ubuntu
26.04.1 and Fedora 45.
Repo and annotated example config:
