An ultra‑light Prometheus unbound_exporter replacement, written in Nim. It compiles into a single static binary with zero external dependencies.
A minimal, high‑performance implementation of the standard unbound_exporter metrics with extremely low memory and CPU usage. Ideal for resource‑constrained systems, embedded devices, and environments where a compact, easy‑to‑distribute exporter is required.
- Small Footprint: Container images and binaries are typically around 400 kB.
- Memory (RSS): Typically under 1MB under normal load.
- CPU Usage: Negligible (<0.1% on most modern systems).
- Zero Dependencies: Statically linked against
musl; runs on any Linux distro. - Modern Nim: Leverages
ARCmemory management andLTO(Link Time Optimization) for maximum speed. - Lightweight Drop‑in Replacement: Compatible with Prometheus’ standard unbound_exporter metrics, making it a seamless, ultra‑small alternative for resource‑constrained systems.
| Aspect | Unbound Exporter | unbound_exporter-lite |
|---|---|---|
| Language | Go | Nim |
| Binary size | ~11 MB | ~500 kB |
| Footprint | ~13 MB | < 1 MB |
| Resource usage | Higher (depends on collectors) | Low and predictable |
| Platform | Many *nix systems | Linux only |
| Complexity | Higher | Very low |
| Use case | General-purpose monitoring | Lightweight |
The Lite version only supports HTTP, no HTTPS.
This project uses a multi-stage Containerfile to ensure a consistent build environment. You do not need Nim or GCC installed on your host machine.
To build a runnable container image for Podman or Docker, run:
podman build -t unbound_exporter .
Once the image is built, start it with:
podman run \
--detach \
--name unbound_exporter \
--publish 9167:9167 \
unbound_exporter
To produce a fully self‑contained static binary you can run directly on the host, build the image with:
podman build --target binary -o ./bin .
This places the compiled binary in ./bin. Run it with:
./bin/unbound_exporter
| Flag | Description |
|---|---|
--web.listen-address=[ADDR]:PORT |
Address and port to listen on (default: 0.0.0.0:9167) |
--unbound.host=[path] |
Path to the remote-control socket (default: /run/unbound.ctl) |
--help |
Show this help message |