Skip to content

kschingiz/meteor-measured

Repository files navigation

Meteor-measured

The library will collect meteor specific metrics using node-measured library.

It's metrics platform agnostic so you can use it with any metrics software you want: signalfx, graphite, prometheus, etc...

Install

meteor npm --save install measured-core
meteor npm --save install measured-reporting

meteor add kschingiz:meteor-measured

Requirements

The library was well tested on Meteor 1.8 version, maybe it will work on older versions.

Usage

You will need to build measured reporter and pass it to meteor-measured:

Step 1:

import { SelfReportingMetricsRegistry, LoggingReporter } from 'measured-reporting';
const registry = new SelfReportingMetricsRegistry(
  new LoggingReporter({
    defaultDimensions: {
      hostname: os.hostname()
    }
  })
);

Step 2:

import meteorMeasured from 'meteor/kschingiz:meteor-measured';

meteorMeasured(registry);

meteorMeasured arguments

meteorMeasured(registry, customDimensions, reportingInterval);

Reported metrics

Those metrics collected and reported

Sockets Metrics:

  1. Open sockets: 10 sockets open
  2. Live data sockets: 8 sockets uses livedata

Session Metrics:

  1. Sessions count: 8 meteor sessions

Pub/sub Metrics:

  1. Subscriptions count: 100 subscriptions
  2. Subscriptions count for each publication: testPub: 20 subs, notTestPub: 80 subs
  3. Published documents: 20 docs published
  4. Published documents for each collection: 10 docs of TestCollection published, 10 docs of NotTestCollection published

Observer Metrics:

  1. Number of observers: 20 observers created
  2. Number Observer drivers: Oplog drivers: 10, Polling drivers: 10
  3. Number of documents for each driver: TestCollection published by oplog driver: 10

Not reported metrics

Please note that the library will not collect and report those metrics:

  1. Node process metrics: CPU usage, RAM usage, etc...
  2. OS metrics: average free memoty, etc...

They are NOT Meteor specific, if you want to collect them, install and use measured-node-metrics:

meteor npm i --save measured-node-metrics

Reporters

Those reporters are available for usage:

  1. LoggingReporter
  2. SignalFx Reporter

You will need to develop your own reporter implementation if you want to report to graphite, prometheus, etc...

TODO

  1. Tests

About

Meteor metrics library

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published