Install the module with: npm install dalmatiner
var Dalmatiner = require('dalmatiner');
var conn = new Dalmatiner('tcp://localhost:5555', 'mybucket');
The client constructor takes three optional arguments.
URI to the Dalmatiner backend server. For example: 'tcp://myserver:5555' or 'udp://myserver:4444'.
Default: 'tcp://127.0.0.1:5555'
The name of the data bucket.
Default: 'node-dalmatiner'
The connection flush interval of datapoints in a tcp stream.
Default: 5
.sendData takes 2 arguments. First is the composite key. Next is an array of one or more data values.
conn.sendData(['website', 'root', 'reponse_time'], [100]);
conn.sendData(['website', 'root', 'reponse_time'], [120, 300]);