Download - Using the MongoDB Monitoring Service (MMS)
![Page 1: Using the MongoDB Monitoring Service (MMS)](https://reader035.vdocument.in/reader035/viewer/2022081413/5491b33cb4795909118b46ea/html5/thumbnails/1.jpg)
Engineer, 10gen
Mark Hillick - @markofu
#mongosv
Using the MongoDB Monitoring Service (MMS)
![Page 2: Using the MongoDB Monitoring Service (MMS)](https://reader035.vdocument.in/reader035/viewer/2022081413/5491b33cb4795909118b46ea/html5/thumbnails/2.jpg)
What, where, numbers?
![Page 3: Using the MongoDB Monitoring Service (MMS)](https://reader035.vdocument.in/reader035/viewer/2022081413/5491b33cb4795909118b46ea/html5/thumbnails/3.jpg)
What is MMS?
• MongoDB monitoring Saas solution with:
– Per minute granularity
– Alerting: host up / down, metrics etc
– Event tracking (server restart, step down, …)
• Host management (auto discover)
• Profiling
• Hardware stats also
![Page 4: Using the MongoDB Monitoring Service (MMS)](https://reader035.vdocument.in/reader035/viewer/2022081413/5491b33cb4795909118b46ea/html5/thumbnails/4.jpg)
Why use MMS? (1)
• Overview – Bird’s Eye
– Macro
• Drill down (minute by minute)
– Micro
![Page 5: Using the MongoDB Monitoring Service (MMS)](https://reader035.vdocument.in/reader035/viewer/2022081413/5491b33cb4795909118b46ea/html5/thumbnails/5.jpg)
Why use MMS? (2)
• Haz all teh things
• Tailored specifically for MongoDB
• Incredibly helpful for 10gen Support when troubleshooting
![Page 6: Using the MongoDB Monitoring Service (MMS)](https://reader035.vdocument.in/reader035/viewer/2022081413/5491b33cb4795909118b46ea/html5/thumbnails/6.jpg)
A few numbers …
• Monitors over 19k database servers
• 40k writes per second
• 400 metrics per ping packet
• 9 billion metrics recorded per day
![Page 7: Using the MongoDB Monitoring Service (MMS)](https://reader035.vdocument.in/reader035/viewer/2022081413/5491b33cb4795909118b46ea/html5/thumbnails/7.jpg)
How?
![Page 8: Using the MongoDB Monitoring Service (MMS)](https://reader035.vdocument.in/reader035/viewer/2022081413/5491b33cb4795909118b46ea/html5/thumbnails/8.jpg)
Set up MMS – it’s easy
• Go to http://mms.10gen.com
– Create a new account or sign in with jira user.
– Pick an explicit company name
– Download and run the agent
– From MMS dashboard, add a host to monitor
![Page 9: Using the MongoDB Monitoring Service (MMS)](https://reader035.vdocument.in/reader035/viewer/2022081413/5491b33cb4795909118b46ea/html5/thumbnails/9.jpg)
The MMS client (agent)
• Small Python app
• A single agent process
– Failover – multiple agents
• Connect to mms.10gen.com (SSL over TCP 443)
![Page 10: Using the MongoDB Monitoring Service (MMS)](https://reader035.vdocument.in/reader035/viewer/2022081413/5491b33cb4795909118b46ea/html5/thumbnails/10.jpg)
Host
![Page 11: Using the MongoDB Monitoring Service (MMS)](https://reader035.vdocument.in/reader035/viewer/2022081413/5491b33cb4795909118b46ea/html5/thumbnails/11.jpg)
Operational Stats
![Page 12: Using the MongoDB Monitoring Service (MMS)](https://reader035.vdocument.in/reader035/viewer/2022081413/5491b33cb4795909118b46ea/html5/thumbnails/12.jpg)
Alerting
![Page 13: Using the MongoDB Monitoring Service (MMS)](https://reader035.vdocument.in/reader035/viewer/2022081413/5491b33cb4795909118b46ea/html5/thumbnails/13.jpg)
Alerts - Config
![Page 14: Using the MongoDB Monitoring Service (MMS)](https://reader035.vdocument.in/reader035/viewer/2022081413/5491b33cb4795909118b46ea/html5/thumbnails/14.jpg)
All good
![Page 15: Using the MongoDB Monitoring Service (MMS)](https://reader035.vdocument.in/reader035/viewer/2022081413/5491b33cb4795909118b46ea/html5/thumbnails/15.jpg)
Alerts - Closed
![Page 16: Using the MongoDB Monitoring Service (MMS)](https://reader035.vdocument.in/reader035/viewer/2022081413/5491b33cb4795909118b46ea/html5/thumbnails/16.jpg)
Events
![Page 17: Using the MongoDB Monitoring Service (MMS)](https://reader035.vdocument.in/reader035/viewer/2022081413/5491b33cb4795909118b46ea/html5/thumbnails/17.jpg)
Security
![Page 18: Using the MongoDB Monitoring Service (MMS)](https://reader035.vdocument.in/reader035/viewer/2022081413/5491b33cb4795909118b46ea/html5/thumbnails/18.jpg)
Security
• Purely stats (metadata). – Log transfer has to be turned on.
• HTTPS & connections are outbound only (from the agent)
• If profiling in db & MMS, then profiling data is sent
![Page 19: Using the MongoDB Monitoring Service (MMS)](https://reader035.vdocument.in/reader035/viewer/2022081413/5491b33cb4795909118b46ea/html5/thumbnails/19.jpg)
On-premise MMS
• Locally Hosted in Customer Infrastructure
• PCI, HIPAA etc
• Enterprise Customers (2.4)
![Page 20: Using the MongoDB Monitoring Service (MMS)](https://reader035.vdocument.in/reader035/viewer/2022081413/5491b33cb4795909118b46ea/html5/thumbnails/20.jpg)
Measure me!!!
![Page 21: Using the MongoDB Monitoring Service (MMS)](https://reader035.vdocument.in/reader035/viewer/2022081413/5491b33cb4795909118b46ea/html5/thumbnails/21.jpg)
Metrics
• Source : http://www.kaushik.net/avinash/wp-content/uploads/2007/10/metrics.jpg
![Page 22: Using the MongoDB Monitoring Service (MMS)](https://reader035.vdocument.in/reader035/viewer/2022081413/5491b33cb4795909118b46ea/html5/thumbnails/22.jpg)
opcounters• Count of every operation per second
• getMore – each batch of a query
![Page 23: Using the MongoDB Monitoring Service (MMS)](https://reader035.vdocument.in/reader035/viewer/2022081413/5491b33cb4795909118b46ea/html5/thumbnails/23.jpg)
memory• Mapped: sum of files on disk
• Virtual memory: 2 x mapped (j) + process overhead
• Resident memory: data in RAM actively used
![Page 24: Using the MongoDB Monitoring Service (MMS)](https://reader035.vdocument.in/reader035/viewer/2022081413/5491b33cb4795909118b46ea/html5/thumbnails/24.jpg)
Lock %• Amount of time spent in the write lock
• From 2.2 : each db has own lock
![Page 25: Using the MongoDB Monitoring Service (MMS)](https://reader035.vdocument.in/reader035/viewer/2022081413/5491b33cb4795909118b46ea/html5/thumbnails/25.jpg)
Background flush• Flush every 60 seconds
• Watch: if flush time gets close to sync delay
![Page 26: Using the MongoDB Monitoring Service (MMS)](https://reader035.vdocument.in/reader035/viewer/2022081413/5491b33cb4795909118b46ea/html5/thumbnails/26.jpg)
Page faults• Disk IO
• Readahead
![Page 27: Using the MongoDB Monitoring Service (MMS)](https://reader035.vdocument.in/reader035/viewer/2022081413/5491b33cb4795909118b46ea/html5/thumbnails/27.jpg)
Replication• On primary: amount of time in oplog
• On secondary: replication delay to primary
![Page 28: Using the MongoDB Monitoring Service (MMS)](https://reader035.vdocument.in/reader035/viewer/2022081413/5491b33cb4795909118b46ea/html5/thumbnails/28.jpg)
Metrics that we discussed• Opcounters
• Lock %
• Background Flush
• Page Faults
• Replication
![Page 29: Using the MongoDB Monitoring Service (MMS)](https://reader035.vdocument.in/reader035/viewer/2022081413/5491b33cb4795909118b46ea/html5/thumbnails/29.jpg)
Metrics for performance
• Resident memory: how much data in RAM?
• Page Faults: paging to disk? Readahead?
• Journal commits in write lock: separate journal
• High background flush: reduce sync delay to smooth
![Page 30: Using the MongoDB Monitoring Service (MMS)](https://reader035.vdocument.in/reader035/viewer/2022081413/5491b33cb4795909118b46ea/html5/thumbnails/30.jpg)
Documentation
![Page 31: Using the MongoDB Monitoring Service (MMS)](https://reader035.vdocument.in/reader035/viewer/2022081413/5491b33cb4795909118b46ea/html5/thumbnails/31.jpg)
Docs? Where?
• Manual : https://mms.10gen.com/help/
– Web– PDF
• FAQ : https://mms.10gen.com/docs/faq
• Blah
![Page 32: Using the MongoDB Monitoring Service (MMS)](https://reader035.vdocument.in/reader035/viewer/2022081413/5491b33cb4795909118b46ea/html5/thumbnails/32.jpg)
Futures
![Page 33: Using the MongoDB Monitoring Service (MMS)](https://reader035.vdocument.in/reader035/viewer/2022081413/5491b33cb4795909118b46ea/html5/thumbnails/33.jpg)
Feature Request
• JIRA Ticket - MMSSUPPORT
![Page 34: Using the MongoDB Monitoring Service (MMS)](https://reader035.vdocument.in/reader035/viewer/2022081413/5491b33cb4795909118b46ea/html5/thumbnails/34.jpg)
Coming up…
• Data visualization, e.g. shard distribution (Q1 2013)???
• Move from Python to Java
• Blah – Ryan???
![Page 35: Using the MongoDB Monitoring Service (MMS)](https://reader035.vdocument.in/reader035/viewer/2022081413/5491b33cb4795909118b46ea/html5/thumbnails/35.jpg)
Conclusion
![Page 36: Using the MongoDB Monitoring Service (MMS)](https://reader035.vdocument.in/reader035/viewer/2022081413/5491b33cb4795909118b46ea/html5/thumbnails/36.jpg)
Conclusion
• Easy to use
• Macro & micro
• Detailed monitoring features
• Aides 10gen Support immensely
![Page 37: Using the MongoDB Monitoring Service (MMS)](https://reader035.vdocument.in/reader035/viewer/2022081413/5491b33cb4795909118b46ea/html5/thumbnails/37.jpg)
Engineer, 10gen
Mark Hillick - @markofu
#mongosv
Questions?