Prometheus/Dogstatsd compatible, minimalistic monitoring agent
Gent is a simple application telemetry collector & exporter. It Ingests
both regular StatsD and its extended variant, DogStatsD messages and
generates Prometheus-compatible telemetry. It is designed to be
reasonably small with no external dependencies. It can be built with
nothing beyond Go standard library.
Gent is intended to be run on the host or inside a container with direct host networking. For maximal usefulness, it is distributed under the MIT license.
Download: gent.tar.xz (~10kB)
Using Gent
Once the agent is running, send *StatsD messages to its listening
port. Gent will process the messages and generate an export for
Prometheus-compatible scrapers. These exports are regenerated every 15
seconds.
Basic Architecture
| HOST |
+-------------------------------------------------------+
| |
| +---------------+ +---------------+ |
| | Service A |-+ +-|+-------------+| |
| +---------------+ | | || Container X || |
| |[msg] | |+-------------+| |
| +---------------+ |[msg] | +---------------+ |
| | Service B |-+ [msg]| |
| +---------------+ | | |
| |[msg] [msg]| |
| | [msg]| |
| | [msg]| |
| |[msg] | +------+ |
| v v | Gent | |
| | | |
+-------------------Y-----------Y------------========---+
localhost container-network
Performance
Tested on a relatively recent AMD Zen 7 @3.3GHz.
With the included stresser sources, gent can sustain a degenerate
rate of 400k packets per second before dropping packages. At rates below
50k/pps the CPU utilisation is negligible.
Miscellania
The name gent is a pun, for "a gent".
It is inspired by bucky3, a monitoring agent used internally at Smarkets .
The ringbuffer design is inspired by LMAX Disruptor but takes a few shortcuts to make the implementation easier to reason about.
For practical information on DogStatsD message format, see
this article.