Simple Graphite UDP client for Node.js

npm install graphite-udp
2 downloads in the last week
5 downloads in the last month

Graphite UDP

Simple Graphite UDP client for Node.js

  • UDP for max performance
  • Uses the plaintext Graphite protocol
  • Group values for a configurable interval of time and send 1 request
  • No other modules dependency


npm install graphite-udp


graphiteUdp = require('./graphite-udp').createClient([options])
graphiteUdp.addMetric(metric, value, [callback])

options is an object with the following defaults:

    host: '',
    port: 2003,
    debug: false,
    interval: 5000, // group metrics for this amount of time and send 1 request
    type: 'udp4'


graphiteUdp = require('./graphite-udp').createClient({debug:true});
for (var i = 0; i < 100; i++) {
    graphiteUdp.addMetric('my.test.metric', parseInt(Math.random()*100, 10));

Make sure your Carbon is listening for UDP connections on carbon.conf

ENABLE_UDP_LISTENER = True # default for version 0.9.10 of Graphite is False


Licensed under the MIT license.

npm loves you