Skip to content

Instantly share code, notes, and snippets.

@anujluthra
Forked from apeckham/backend.js
Created July 24, 2012 04:46
Show Gist options
  • Save anujluthra/3168089 to your computer and use it in GitHub Desktop.
Save anujluthra/3168089 to your computer and use it in GitHub Desktop.
simple statsd backend that prints json to /var/log/statsd.log
exports.init = function(startup_time, config, events) {
events.on('flush', function(timestamp, metrics) {
console.log(JSON.stringify(timestamp));
console.log(JSON.stringify(metrics));
});
return true;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment