Skip to content

Periodically send values out to a Collectd server for statistics

Notifications You must be signed in to change notification settings

Thodoras/node-collectdout

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Synopsis

Periodically send values out to a Collectd server for statistics.

This piece of code has been sponsored by Superfeedr. They are awesome and you should really consider their service if you process RSS feeds!

Installation

npm i collectdout

Usage

Spawn a client that sends the data every 60s to myserver:

var Collectd = require('collectdout');
var client = new Collectd(60000, "collectd_server", 25826, "my_server");

Fourth argument is optional, default is os.hostname()

Create your plugin instance:

var plugin = client.plugin('myapp', 'worker13');

Set gauges, they are averaged within a sampling period:

plugin.setGauge('users', 'total', 23);
plugin.setGauge('load', '0', [1.0, 0.85, 0.7]);

Manipulate counters:

plugin.setCounter('if_octets', 'eth0', [0, 0]);
plugin.addCounter('uptime', '0', 1);

Change log

  • v0.0.6
    • Possibility to send notification
  • v0.0.5
    • Add this changelog
    • Possibility to send data to more than one server
  • v0.0.4
    • Fix interval issue
    • Add optionnal parameter to set hostname
  • v0.0.3
    • Fix multiple value sending

About

Periodically send values out to a Collectd server for statistics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%