Code Monkey home page Code Monkey logo

nodegraphite's Introduction

nodegraphite

graphite client for nodejs

Install

npm install nodegraphite

Test

jasmine

Events

error

When there is a socket error occurs, the err info will be in event listener.

APIs

GraphiteClient

Initialize a new graphite client.

  • port {String}: graphite server port, default is 2003
  • host {String}: graphite server host, default is localhost
Usage
var GraphiteClient = require('nodegraphite');
var cli = new GraphiteClient();

write

Write metrics data to grapite server.

  • metrics {Object}: data sended to graphite, {metric: value}
  • callback {Function}: optional callback function, the callback function will take two parameters (err, data)
Usage
cli.once('error', function (err) {
  console.error(err);
});
cli.write({foo: 23});

Debug

If you use debug package in your app, you can set DEBUG=graphite to debug nodegraphite.

nodegraphite's People

Contributors

fatelei avatar

Stargazers

 avatar James avatar

Watchers

 avatar  avatar

Forkers

decadent shimi

nodegraphite's Issues

Does not write the data to graphite

Hi,

I was not able to write the metrics data to graphite. below is the sample application i wrote:

var GraphiteClient = require("./lib/graphite").GraphiteClient;
var gc = new GraphiteClient(2003, 'graphite.example.com');

var metrics = {foo2_bar: 30};
gc.write(metrics, function(err) {
console.log(err);
console.log(metrics);
});

The err printed from above console log is 'undefined'. In your javascript file graphite.js neither error listener got called nor the data listener. Can you check what's wrong ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.