collectd/collectd — pull request #358 by octo (2013-06-21 15:48:30+00:00)
Title: statsd plugin: Add a statsd-compatible plugin for event metrics.

This patch adds a **StatsD plugin** – a plugin implementing the network protocol used by *StatsD*.

Applications can report "events" by creating a small and simple UDP packet which contains an arbitrary metric name and sending it to an address. Since no response is required (nor sent) packets are sent in a "fire and forget" fashion.

This plugin, like the original *StatsD*, stores information about these asynchronous events, e.g. by increasing a counter. These consolidated metrics are then read periodically and dispatched, e.g. as a rate.

The four data types currently implemented in the original version of *StatsD* are all available: *counter*, *timer*, *gauge* and *set*. All events are handled by a single thread, which may become a bottleneck. A simple benchmark puts the performance of this plugin in the 150k metrics/s ballpark.