Hi everybody, today I have completed developing a new package which will collect and report Meteor metrics. You can use it with any reporter and any metrics software: signalfx, graphite, prometheus, no matter.
Links:
Atmosphere
GitHub
You can use it in conjunction with meteor-elastic-apm where apm will trace code execution, while meteor-measured will collect important metrics.
Please let me know what you think about this package. Thanks!
Copying Readme here:
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:
- 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