A tiny Linux system metrics exporter for OTLP (x86_64 + aarch64)
Project details
A ~100 KiB static binary that collects system metrics and pushes them directly to an OTLP endpoint, using only ~30 KiB of RAM at idle.
Drop-in compatible with Prometheus node_exporter. It exposes the same system metrics, so existing dashboards can be reused.
Written in C, with x86_64 and aarch64 support, TLS, and no runtime dependencies.
I wanted to collect system metrics from a Raspberry Pi and send them to an OTLP endpoint.
The existing solutions worked, but running hundreds of megabytes of telemetry infrastructure just to collect a handful of system metrics felt excessive. So I decided to build a small exporter while keeping compatibility with node_exporter metrics.
What I did not expect was to win three orders of magnitude of memory doing it.
malloc on the hot cycle path.Only Grafana Alloy is compared here, because it is the one that does everything and can be measured head-to-head with pico_exporter. Measured on my machine, over the same running window:
| Grafana Alloy | pico_exporter | Ratio | |
|---|---|---|---|
| Binary size | 530 000 kB | 100 kB | 5300× smaller |
| Resting RSS | 400 000 kB | 30 kB | ~13 000× less memory |
| CPU per day | 516 s | 6 s | 86× less CPU |
| Collection time | 50 ms | 6 ms | 8× faster |
Compared with Grafana Alloy and the Prometheus node_exporter:
| pico_exporter | Grafana Alloy | node_exporter | |
|---|---|---|---|
| Delivery | push (OTLP) | push (OTLP) and pull | pull |
| Metrics scope | core system metrics + textfile | Full OpenTelemetry ecosystem | System metrics (extensible) |
| Logs & traces | no | yes | no |
| Configuration | a few environment variables | Declarative config file | Many flags |
| Extensibility | Fixed set | Large component catalog | Collector plugins |
| Language | C11 | Go | Go |
| Binary | ~100 KiB | ~530 MB | ~22 MB |
Visit the GH page for the full description.
Comments
0Start the conversation
Share the first comment.