clumon

0.0.2 • Public • Published

Cluster metrics

Inspired by stats collection module from Node.js 1 million HTTP Comet connections test by Alexander Shtuchkin

Install

  npm install --save clumon

Use

In every process (master or worker) attach module

var metrics = require('clumon');

In master, use collector property to access collector instance

var collector = metrics.collector;

Listen to data event on it and get collected stats

collector.on('data', function(frame) { 
  // ...
});

Stat frame

TODO add frame sample

Custom metrics

TODO

Monitoring server

You can create a monitoring server using metrics.server(). Net.Server instance is returned.

var server = metrics.server();
 
server
    .listen(8000)
    .on('error', function(e) {
        // handle errors
    });

This is a raw socket server. Then connected, it began to dump screens of text until connection is closed:

# nc monitoring.host.tld 8000

TODO Add screen sample

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i clumon

      Weekly Downloads

      1

      Version

      0.0.2

      License

      ISC

      Last publish

      Collaborators

      • olegas