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:
1import { SelfReportingMetricsRegistry, LoggingReporter } from 'measured-reporting'; 2const registry = new SelfReportingMetricsRegistry( 3 new LoggingReporter({ 4 defaultDimensions: { 5 hostname: os.hostname() 6 } 7 }) 8);
Step 2:
1import meteorMeasured from 'meteor/kschingiz:meteor-measured'; 2 3meteorMeasured(registry);
meteorMeasured
arguments
1meteorMeasured(registry, customDimensions, reportingInterval);
Reported metrics
Those metrics collected and reported
Sockets Metrics:
- Open sockets: 10 sockets open
- Live data sockets: 8 sockets uses livedata
Session Metrics:
- Sessions count: 8 meteor sessions
Pub/sub Metrics:
- Subscriptions count: 100 subscriptions
- Subscriptions count for each publication: testPub: 20 subs, notTestPub: 80 subs
- Published documents: 20 docs published
- Published documents for each collection: 10 docs of TestCollection published, 10 docs of NotTestCollection published
Observer Metrics:
- Number of observers: 20 observers created
- Number Observer drivers: Oplog drivers: 10, Polling drivers: 10
- 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:
- Node process metrics: CPU usage, RAM usage, etc...
- 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:
You will need to develop your own reporter implementation if you want to report to graphite, prometheus, etc...
TODO
- Tests