graphite-client
Node.js client for Graphite
Install
$ npm install graphite-client
Usage
Create instance
var Graphite = ; var graphite = serverHost 2003 'UTF-8' 3000 { log;};
The client tries to reconnect on connection timeout
Listen fot the underline socket events
graphite; graphite;
Connect to the graphite server
graphite;
Write to the server
var metrics = 'pre1' : 'pre2' : 'key1' : 'value1' 'key2' : 'value2' 'key3' : 'value3'; graphite;
Assuming the current time is Jul 13 2015 00:00:00 UTC (1436745600 in sec Unix Epoch Time) The folliwng data will be send to the server
pre1.pre2.key1 value1 1436745600
pre1.pre2.key2 value2 1436745600
key3 value3 1436745600