In the search for the right backend to implement a metrics suited to my projects, I saw that Riemann (event server built on Closure) would save time by already having all kinds of math related to means, percentiles and a flexible configuration.
The protocol uses Google’s Protocol Buffers, but it’s very simple (I was able to go from 0 to a simple driver in less than 4 hours - including the protobuf part). Basic functionality as sending metrics and querying are ready, but the driver still needs polishing - include a connection pool, and a twisted version. As it is right now, it works great with gevent apps.
A basic send/query app would be like this:
It supports both tcp and udp transports and includes the proper classes translated from protobuf spec to python. Requires google’s protobuf library. The repo is on github pyriemann. There is an examples directory with riemann_health.py, translated from the ruby version to python.