Net::Statsd::Server - a Perl port of Flickr/Etsy's statsd metrics daemon


For the statsd client library, check out the Net::Statsd module:

Net::Statsd::Server is the server component of statsd. It implements a daemon that listens on a given host/port for incoming UDP packets and dispatches them to whatever you want, including Graphite or your console. Look into the Net::Statsd::Server::Backend::* namespace to know all the possibilities, or write a backend yourself.


So, what do you use a statsd daemon for? You use it to track metrics of all sorts.

Background information here:


Why did I do this? There's already a gazillion implementations of statsd. The original Perl one from Cal Henderson/Flickr was not released as a complete working software AFAIK:

then Etsy rewrote it as Javascript to run under node.js. Other implementations range from C to Python, etc...

I wrote one in Perl for a few reasons:

  • Because I don't like adding node.js to our production stack just to run statsd.

  • to learn how statsd was put together

  • to learn AnyEvent

  • to learn how to build a high performance UDP server

  • to have some good fun

Basically, to learn :-)


You shouldn't need any instructions to use it. It comes with batteries included.

There is a bin/statsd script included in the CPAN distribution, together with a bunch of example configuration files that should get you up and running in no time.

This statsd script basically does exactly what the Etsy statsd javascript version does. It's a drop-in replacement.

I have tried to keep compatibility with the node.js version of statsd as much as I could, so you can literally use the same configuration files, bar a conversion from javascript to JSON format.

You can also consult the node-statsd documentation, up on Github as well:


To have an idea of the compability between the Javascript statsd server and this Perl version, you can have a look at the example configuration file bundled with this distribution under bin/localConfig.js, or here:

You will find all the Perl statsd supported (known working) configuration keys documented there. If an option is supported and working, it will always behave exactly as the Javascript version of statsd, unless there's bugs of course.

Anything not documented there will probably not work at all.


Cosimo Streppone, <>


The Net::Statsd::Server module is Copyright (c) 2013 Cosimo Streppone. All rights reserved.

You may distribute under the terms of either the GNU General Public License or the Artistic License, as specified in the Perl 5.10.0 README file.


If you want to send patches or contribute, the easiest way is to pull the source code repository hosted at Github:


Many thanks to my awesome wife that coped with me trying to write this in a single weekend, leaving barely any time for anything else.

Many thanks to my current employer, Opera Software, for at least partly, sponsoring development of this module. Technically, Opera is sponsoring me trying it in production :-)