StatsD backend to emit stats to AMQP
Switch branches/tags
Nothing to show
Clone or download
aw Merge pull request #7 from mrtazz/fix-missing-data
Send metrics in JSON format. Fixes #6
Latest commit 3a76a9b Sep 1, 2015

StatsD AMQP publisher backend


This is a pluggable backend for StatsD, which publishes stats to an AMQP topic exchange instead of graphite.


npm install statsd-amqp-backend


You have to give basic information about your AMQP server to use:

  backends: [ "statsd-amqp-backend" ]
, amqp: {
    host: 'localhost'
  , port: 5672
  , login: 'guest'
  , password: 'guest'
  , vhost: '/'
  , defaultExchange: ''
  , messageFormat: 'graphite' // can be 'graphite' or 'json'
  , ssl: {
      enabled : false
    , keyFile : '/path/to/key/file'
    , certFile : '/path/to/cert/file'
    , caFile : '/path/to/cacert/file'
    , rejectUnauthorized : false


When using messageFormat: 'json', at flush time the entire metrics payload will be sent to the defaultExchange using the routing key json_payload, with contentType application/json. Example:


When using messageFormat: 'graphite', at flush time each metric will be sent individually to the defaultExchange using the metric's key name as the routing key, with contentType text/graphite. Example: 0 1387255600 0 1387255600 4 1387255600 0 1387255600



If you want to contribute:

  1. Clone your fork
  2. Hack away
  3. If you are adding new functionality, document it in the README
  4. Push the branch up to GitHub
  5. Send a pull request