Official healthchecks for Sznuper.
Each healthcheck is a standalone C binary compiled with Cosmopolitan Libc — a single portable executable that runs on any Linux architecture (x86_64, aarch64) with zero external dependencies. No df, no awk, no runtime needed.
| Healthcheck | Description |
|---|---|
disk_usage |
Disk space usage for a given mount point |
cpu_usage |
CPU utilization over a sampling interval |
memory_usage |
Memory and swap usage |
ssh_journal |
Detects SSH login events from journald (pipe trigger) |
Every healthcheck follows the same contract:
- Input: environment variables (
HEALTHCHECK_ARG_*for user-defined args,HEALTHCHECK_TRIGGERfor trigger metadata) and optionally stdin (for pipe/watch triggers). - Output: events on stdout using
--- eventdelimiter, followed bykey=valuepairs. Thetypefield is required in every event.
Example output from disk_usage:
--- event
type=high_usage
mount=/
usage_percent=84.3
available=8G
Each healthcheck documents its arguments, outputs, and event type logic in a header comment.
A healthcheck can be any executable — Go, Rust, Python, Bash, anything. It just needs to read its config from HEALTHCHECK_ARG_* environment variables and print --- event blocks with type= and key=value fields to stdout.
For healthchecks you want to distribute, Cosmopolitan C is recommended for the same reason the official healthchecks use it: one binary, every architecture, no dependencies.
See the Sznuper spec for the full healthcheck interface documentation.
MIT
