Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

node-cluster-metric

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-cluster-metric

Extendable metric collector for node cluster

  • 0.0.1
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
4
Maintainers
1
Weekly downloads
 
Created
Source

Cluster metrics

Install

  npm install --save cluster-metrics

Use

In every process (master or worker) attach module

var metrics = require('cluster-metrics');

In master use collector property to access collector instance

var collector = metrics.collector;

Listen to data event on it and get collected stats there

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

FAQs

Package last updated on 05 Apr 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc