From version 2.2.0 Meteor-elastic-apm by default comes with meteor-measured.
Meteor-measured sends a lot of useful meteor specific metrics:
- Open sockets: 10 sockets open
- Live data sockets: 8 sockets uses livedata
- Sessions count: 8 meteor sessions
- 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
- 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
Meteor-measured uses elastic agent registry and sends metrics data directly to kibana.
How to visualize metrics
- Start your app with metrics, wait for some time 2-3 minutes, do something in your app to collect and send metrics. We need to wait while
elasticsearchwill save and index our metrics.
- Go to Kibana -> Management -> Index Patterns ->
apm-*You will see a list of all indexed fields, click on
Refresh Fields listbutton, the button is located on top-right corner:
Sorry for my amazing drawing skills.
After Refreshing was completed try to find some of the fields which we are sending:
Time to Visualize our metrics: Go to Kibana -> Visualize -> Create Visualization.
Line chart, index pattern should be
- You need to configure the chart to visualize meteor metric data. Let's draw
sessions.countmetrics, to do so you should configure chart this way: Y-Axis props:
Aggregation = Max Field = sessions.count Custom Label = Sessions
Aggregation = Date Histogram Field = @timestamp
- Click on blue "Apply Changes" button.
- Configure time range to be:
30 minutes ago. Click on "Refresh"
Repeat steps for every metric field you need, you can combine charts in Dashboard later.
PS: I am not elastic search, kibana expert, maybe there is easier steps to do the same. If you want to correct something or add useful tips and tricks, I am waiting for your PRs