Simple daemon for easy stats aggregation
Перейти к файлу
Dan Rowe 8d5f687622 Merge pull request #367 from matschaffer/patch-1
Added additional detail for timing percentiles
2013-11-28 18:22:14 -08:00
backends * whitespace 2013-08-21 16:12:24 -07:00
bin add bin/statsd 2012-06-28 16:07:37 +02:00
debian Merge branch 'master' of https://github.com/codepainters/statsd 2013-10-01 12:08:57 -04:00
docs Added additional detail for timing percentiles 2013-11-24 00:10:59 -08:00
examples updating the import url in doc.go 2013-09-23 22:50:58 -04:00
lib Update helpers.js to allow any value for sets 2013-09-29 22:00:29 -07:00
test Update helpers_tests.js for sets tests 2013-10-01 09:46:30 -07:00
utils clearer sample graphite url 2013-02-19 19:02:37 -05:00
.gitignore Revert "Add local config to git ignore" 2013-04-11 11:51:58 -04:00
.travis.yml Remove v0.6 from node versions we test against 2013-07-03 16:38:14 -04:00
Changelog.md typo 2013-03-31 20:48:30 +02:00
LICENSE adding license (mit) 2010-12-29 19:50:11 -05:00
README.md Fix typo in readme: Verfiy => Verify 2013-11-28 13:14:07 +02:00
exampleConfig.js * merge conflict 2013-08-21 16:10:26 -07:00
exampleProxyConfig.js Update to use config library, make cacheSize a config option, and switch to using the health status 2013-04-10 18:54:08 +00:00
package.json Merge branch 'master' of https://github.com/etsy/statsd into cluster_proxy 2013-07-31 18:59:38 +00:00
proxy.js add additional logging 2013-07-31 21:17:27 -07:00
run_tests.sh Make failing tests exit with non-zero status 2012-07-20 22:17:08 -07:00
stats.js measure and graph timestamp generation lag 2013-11-02 13:40:07 -04:00

README.md

StatsD Build Status

A network daemon that runs on the Node.js platform and listens for statistics, like counters and timers, sent over UDP and sends aggregates to one or more pluggable backend services (e.g., Graphite).

We (Etsy) blogged about how it works and why we created it.

Inspiration

StatsD was inspired (heavily) by the project (of the same name) at Flickr. Here's a post where Cal Henderson described it in depth: Counting and timing Cal re-released the code recently: Perl StatsD

Key Concepts

  • buckets Each stat is in its own "bucket". They are not predefined anywhere. Buckets can be named anything that will translate to Graphite (periods make folders, etc)

  • values Each stat will have a value. How it is interpreted depends on modifiers. In general values should be integer.

  • flush After the flush interval timeout (defined by config.flushInterval, default 10 seconds), stats are aggregated and sent to an upstream backend service.

Installation and Configuration

  • Install node.js

  • Clone the project

  • Create a config file from exampleConfig.js and put it somewhere

  • Start the Daemon:

    node stats.js /path/to/config

More Specific Topics

Debugging

There are additional config variables available for debugging:

  • debug - log exceptions and print out more diagnostic info
  • dumpMessages - print debug info on incoming messages

For more information, check the exampleConfig.js.

Tests

A test framework has been added using node-unit and some custom code to start and manipulate statsd. Please add tests under test/ for any new features or bug fixes encountered. Testing a live server can be tricky, attempts were made to eliminate race conditions but it may be possible to encounter a stuck state. If doing dev work, a killall statsd will kill any stray test servers in the background (don't do this on a production machine!).

Tests can be executed with ./run_tests.sh.

Meta

  • IRC channel: #statsd on freenode
  • Mailing list: statsd@librelist.com

Contribute

You're interested in contributing to StatsD? AWESOME. Here are the basic steps:

fork StatsD from here: http://github.com/etsy/statsd

  1. Clone your fork
  2. Hack away
  3. If you are adding new functionality, document it in the README
  4. If necessary, rebase your commits into logical chunks, without errors
  5. Verify your code by running the test suite, and adding additional tests if able.
  6. Push the branch up to GitHub
  7. Send a pull request to the etsy/statsd project.

We'll do our best to get your changes in!

Contributors

In lieu of a list of contributors, check out the commit history for the project: https://github.com/etsy/statsd/graphs/contributors