1Net::Statsd::Server(3)User Contributed Perl DocumentationNet::Statsd::Server(3)
2
3
4
6 Net::Statsd::Server - a Perl port of Flickr/Etsy's statsd metrics
7 daemon
8
10 For the statsd client library, check out the "Net::Statsd" module:
11
12 https://metacpan.org/module/Net::Statsd
13
14 "Net::Statsd::Server" is the server component of statsd. It implements
15 a daemon that listens on a given host/port for incoming UDP packets and
16 dispatches them to whatever you want, including Graphite or your
17 console. Look into the "Net::Statsd::Server::Backend::*" namespace to
18 know all the possibilities, or write a backend yourself.
19
21 So, what do you use a "statsd" daemon for? You use it to track metrics
22 of all sorts.
23
24 Background information here:
25
26 http://codeascraft.etsy.com/2011/02/15/measure-anything-measure-everything/
27
29 Why did I do this? There's already a gazillion implementations of
30 statsd. The original Perl one from Cal Henderson/Flickr was not
31 released as a complete working software AFAIK:
32
33 https://github.com/iamcal/Flickr-StatsD
34
35 then Etsy rewrote it as Javascript to run under node.js. Other
36 implementations range from C to Python, etc...
37
38 I wrote one in Perl for a few reasons:
39
40 · Because I don't like adding node.js to our production stack just to
41 run statsd.
42
43 · to learn how statsd was put together
44
45 · to learn AnyEvent
46
47 · to learn how to build a high performance UDP server
48
49 · to have some good fun
50
51 Basically, to learn :-)
52
54 You shouldn't need any instructions to use it. It comes with batteries
55 included.
56
57 There is a "bin/statsd" script included in the CPAN distribution,
58 together with a bunch of example configuration files that should get
59 you up and running in no time.
60
61 This statsd script basically does exactly what the Etsy statsd
62 javascript version does. It's a drop-in replacement.
63
64 I have tried to keep compatibility with the node.js version of statsd
65 as much as I could, so you can literally use the same configuration
66 files, bar a conversion from javascript to JSON format.
67
68 You can also consult the node-statsd documentation, up on Github as
69 well:
70
71 https://github.com/etsy/statsd
72
74 To have an idea of the compability between the Javascript statsd server
75 and this Perl version, you can have a look at the example configuration
76 file bundled with this distribution under "bin/localConfig.js", or
77 here:
78
79 https://github.com/cosimo/perl5-net-statsd-server/blob/master/bin/localConfig.js
80
81 You will find all the Perl statsd supported (known working)
82 configuration keys documented there. If an option is supported and
83 working, it will always behave exactly as the Javascript version of
84 statsd, unless there's bugs of course.
85
86 Anything not documented there will probably not work at all.
87
89 Cosimo Streppone, <cosimo@cpan.org>
90
92 The Net::Statsd::Server module is Copyright (c) 2013 Cosimo Streppone.
93 All rights reserved.
94
95 You may distribute under the terms of either the GNU General Public
96 License or the Artistic License, as specified in the Perl 5.10.0 README
97 file.
98
100 If you want to send patches or contribute, the easiest way is to pull
101 the source code repository hosted at Github:
102
103 https://github.com/cosimo/perl5-net-statsd-server
104
106 Many thanks to my awesome wife that coped with me trying to write this
107 in a single weekend, leaving barely any time for anything else.
108
109 Many thanks to my current employer, Opera Software, for at least
110 partly, sponsoring development of this module. Technically, Opera is
111 sponsoring me trying it in production :-)
112
113
114
115perl v5.28.0 2016-06-01 Net::Statsd::Server(3)