MongoDB Database Monitoring


MongoDB - An Overview

MongoDB is a NoSQL database designed for ease of development and scalability to support massive data processing and storage. With Applications Manager's MongoDB monitoring capability, we're letting users gain in-depth visibility into critical metrics to optimize their data infrastructures. Users can collect statistical data like Memory Utilizations statistics, open connections statistics, CPU usage, database operation performance and latency, transaction details, response time, lock current queue and journaling statistics. Applications Manager features graphs, custom dashboards and automated alerts to track performance and resource utilization of your database systems from a centralized console.

Creating a new MongoDB monitor

Supported Versions: MongoDB 3.6.2 and older versions. We support mongod services and mopngos services

Prerequisites for monitoring MongoDB: To create a MongoDB monitor in Applications Manager, a user should have read privileges to all the MongoDB databases

To create a Mongo database server monitor, follow the steps given below:

  1. Click on New Monitor link.
  2. Select Mongo.
  3. Specify the Display Name of the Mongo monitor.
  4. Enter the HostName or IP Address of the host where MongoDB/mongo process runs.
  5. Enter the Port where the server is running.By default, it will be 27017.
  6. To discover only this node and not all nodes in the ReplicaSet / Sharding disable the option Discover all nodes in the ReplicaSet / Sharding. By default, it is enabled.
  7. Check the Is Authentication Required field, to give the credentials to be used to connect to the MongoDB server. Now enter the UserName and Password of the credential.
  8. Specify the Polling Interval in minutes.
  9. If you are adding a new monitor from an Admin Server, select a Managed Server.
  10. Choose the Monitor Group with which you want to associate the MongoDB server to, from the combo box (optional). You can choose multiple groups to associate your monitor.
  11. Click Add Monitor(s). This discovers the MongoDB server from the network and starts monitoring it.

Monitored Parameters

MongoDB is monitored based on the parameters or the attributes listed below. These attributes provide information about the functioning of the monitors of MongoDB. You can also configure thresholds to the numerical attributes monitored by the server based on these details.

Go to the Monitors Category View by clicking the Monitors tab. Click on MongoDB under the Database Table. Displayed is the Mongodb bulk configuration view distributed into three tabs:

  • Availability tab, gives the Availability history for the past 24 hours or 30 days.
  • Performance tab gives the Health Status and events for the past 24 hours or 30 days.
  • List view enables you to perform bulk admin configurations.

The Monitor Snapshot displays the availability and performance history for the past 6 hours. The businessview will help you have an integrated high-level view of the links between the different nodes in the replica set or sharding server. However, this view will not be available for single servers that are not part of any replica set or sharding server.

Server Stats

Parameters Description
Performance Status Specifies the used and free memory of the server in percentage.
Memory Utilization Specifies the used, free and total memory of the server in mega bytes.
Current Connections Number of used and available connections in the database server. This will help to asses the current load and capacity requirements of the server.
Network Traffic Specifies the amount of network traffic sent and received by the database, in bytes per second. This value will help you ensure that network traffic sent to and by the mongod process is consistent.
Database Operations Counter The total number of various database operations (insert, get, query, update, command) per second since the mongod instance last started. This data helps to analyze and track the load on the database.
Assert Errors The number of asserts (regular, warning, message, user, rollover) per second raised since the server process started.
Lock Statistics The time, in seconds, since the database last started.
Lock Current Queue Details Number of operations that are currently queued and waiting for the read-lock/ write-lock.
Lock Active Client Details Number of active client connections to the database, performing read/ write operations.
Background Flushes Number of times the database has flushed all writes to disk per second.
Background Flushes Statistics Total number of seconds that the mongod processes have spent writing data to disk.
Journaling Commits Number of transactions written to the journal during the last journal group commit interval. A Journal is a sequential, binary transaction used to bring the database into a consistent state in the event of a hard shutdown. MongoDB performs group commits when journaling, i.e., a series of operations are committed at once over many milliseconds. This is done to achieve high performance.
Journaling Data Number of data in megabytes (MB) written to journal during the last journal group commit interval.
Journaling Statistics Number of seconds spent for each phase of journaling in the last journal group commit interval.

Note: All the metrics above in Server Stats will be displayed for a mongod device. Whereas for a mongos device, only the first six metrics will be displayed.

Cursors

Parameters Description
Number of open cursors The maximum number of open cursors a session can have at once. You can use this parameter to prevent a session from opening an excessive number of cursors.
Number of timed-out cursors The number of timed out cursors since the last server restart.

Index Counters

Parameters Description
Index Accessed The number of indexes accessed by a MongoDB statement.
Index served from Memory Indexes that reside in memory and when queried, will be served from memory as long as the whole set fits in the memory.
Index served from Disk Indexes that don't fit in the memory and must be served from disk.
Miss Ratio The ratio of hits to misses. The misses is the total number of times that an operation tried to access an index that was not in memory per collection. The hits is the total number of times that indexes have been accessed and the mongod was able to return the index from memory per collection.

Page Faults

Parameters Description
Total Page Faults The total number of page faults that occured when MongoDB reads from or writes data to parts of its data files that are not currently located in physical memory or when physical memory is exhausted .
Page Faults Counter MongoDB on Windows counts both hard and soft page faults. The MongoDB page fault counter may increase dramatically in moments of poor performance and may correlate with limited physical memory environments.

Database Statistics

Parameters Description
Database Name The name of the database whose statistics are being monitored.
Collections The number of the Collections, i.e a group of MongoDB documents, in the database.
Objects All the json data and performance objects in a collection.
Avgerage Object Size The average size of all the KEY:VALUE objects contained within the shard.
Data Size The size of data stored in a collection in MB.
Indexes The total number of indexes in the database.
Index Size The total size of all indexes on the database in KB.
File Size The size of the files that hold the database contents in MB.

Replica Stats

Parameters Description
Replication Details Status information for MongoDB’s replica set configuration. Only when the current host has replication enabled these values will be displayed.
Replication Operations Counter Total number of various database replication operations (insert, update, delete, getmore, command) per second since the mongod instance last started. These values will help to analyze the load on the replica.
Sharding Operations Counter - Sharded/ NotSharded Total number of various database sharding and notsharding operations (insert, update, delete, getmore, command) per second since the mongos instance last started.

Note: The tab Replica Stats display only replication details for a mongod device and sharding details for a mongos device.