For many of us in the DevOps field, MongoDB is a critical part of our IT stack. It would be an understatement to say that MongoDB does a lot, with many organizations using it as their backend storage framework, analytics backend, and so on.
MongoDB Performance Monitoring
So your MongoDB cluster really, really needs to be in tip-top shape. All the time. And if it’s not then you need to know asap — or better yet — prevent problems before they kick in and make your life difficult. That’s where Sematext Cloud comes in — with MongoDB monitoring, anomaly detection, and alerting. MongoDB exposes a boatload of performance metrics, but instead of just throwing all of them on endless charts, we’ve taken the time to cherry pick what we think are the top 50 most valuable MongoDB metrics to monitor. We have furthermore made it possible to filter the MongoDB metrics by server, as well as a database and table where possible.
MongoDB Monitoring Dashboard
The key performance metric groups we track are:
- Database Operations
- Database Memory
- Database Storage
- Database Journal
- Background Flushes
The monitoring dashboard below provides 9 charts with MongoDB key metrics:
- Row 1 displays CPU, Memory and Disk Metrics
- Row 2 displays Database Operations, Database Memory and Database Storage Metrics.
- Row 3 adds Collection/Document Metrics, Locks, and wait times; followed by Network Metrics for MongoDB
Sematext MongoDB Monitoring Dashboard
In case you monitor a MongoDB cluster, the Server Tab provides a quick overview for the Health of each node:
Sematext Server View
The Reports on the left side of the screen below provide detailed information for each group of metrics. Let’s have a quick look at them.
OS Metrics: CPU Metrics, Memory Usage, Disk Space and I/O
Below is an example of some of the key MongoDB Metrics:
- Database Operations: Counters for Queries, Insert, Update, Delete and other commands for the main database plus replica operations
- Database Memory: Resident-, Virtual-, Mapped-, and Journal Memory
- Database Storage: Size of Data Files, Namespace Files, DB Files etc., plus Size of Objects, Number of Collections and Objects
MongoDB Storage & Collections
Documents & Locks
The screenshot below shows:
- Documents: Counters for Documents inserted, updated or returned by queries
- Locks: Lock counters and lock acquisition wait times for Global, Database, Collection and Journal level. Since MongoDB 3.x Locks are not always global. Sematext shows a breakdown for all lock types. These metrics are good candidates for alerting, when anomalies are detected. Simply add an alert from the menu in the top-left corner in each chart.
Metrics for all MongoDB Locks
Network & Database Journal
Other key MongoDB metrics that Sematext displays are:
- Network: Number of client connections, Received and transmitted data, Request rate
- Database Journal: Commits, Early Commits, Commit times and lock times
Combined NodeJS Apps & MongoDB Monitoring
MongoDB Journal Metrics
Custom Dashboard with MongoDB Locks and Node.js Event Loop Latency
We hope you like this new addition to Sematext. Got ideas how we could make it more useful for you? Let us know via comments, email or @sematext.
Not using SPM yet? Check out the free 30-day trial by registering here. There’s no commitment and no credit card required. Even better — combine Metrics with Logs to make the integration of performance metrics, logs, events and anomalies more robust for those looking for a single pane of glass.