Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fatelei/nodegraphite
graphite client for nodejs
https://github.com/fatelei/nodegraphite
Last synced: about 1 month ago
JSON representation
graphite client for nodejs
- Host: GitHub
- URL: https://github.com/fatelei/nodegraphite
- Owner: fatelei
- Created: 2014-02-20T09:45:11.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2015-10-20T01:50:49.000Z (about 9 years ago)
- Last Synced: 2024-11-11T21:56:18.367Z (about 2 months ago)
- Language: JavaScript
- Size: 192 KB
- Stars: 2
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
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`.