Skip to content

Node.js

To send data to Tornimo, you need to install some graphite-compatibile library like for example node-graphite. It can be installed using npm.

npm install graphite

Example showing how to send some example metric using node-graphite library.

var graphite = require('graphite');
var client = graphite.createClient(`plaintext://${YOUR_TORNIMO_PUSH_URL}:2003`);

var metrics = {};
metrics[`${YOUR_TORNIMO_TOKEN}.example.metric`] = 10;
client.write(metrics, function(error) {
  if (error != null) {
    console.log(error);
  }
});