ApsaraDB for MongoDB exposes metrics across four monitoring views: instance monitoring, node monitoring, advanced monitoring, and Performance Trend. This page describes each metric — its key, unit, meaning, and when a high or abnormal value warrants action.
Byte values in the console are automatically converted to MB, GB, or TB for readability.
Instance monitoring
For the metrics available for your instance type, see the console.
Resource utilization
| Metric | Key | Metric name | Unit | Description | Supported instance types |
|---|---|---|---|---|---|
| Disk usage | DiskUsage | disk_usage | % | The percentage of total disk capacity in use. If usage exceeds 80%, change the instance configuration. For troubleshooting, see High disk usage. | Standalone, replica set, sharded cluster, Serverless |
| CPU usage | CpuUsage | cpu_usage | % | The sum of system CPU usage and user CPU usage. High CPU usage can cause slow reads and writes. See High CPU usage for troubleshooting steps. | Standalone, replica set, sharded cluster, Serverless |
| CPU usage — system | MongoDB_CpuDetail | cpu_sys | % | System-level CPU usage. | Standalone, replica set, sharded cluster |
| CPU usage — user | MongoDB_CpuDetail | cpu_user | % | User-level CPU usage. | Standalone, replica set, sharded cluster |
| Memory usage | MemoryUsage | mem_usage | % | Memory is primarily consumed by the WiredTiger storage engine, client connections, and request processing. See High memory usage for causes and optimization strategies. | Standalone, replica set, sharded cluster, Serverless |
Disk space usage
| Metric | Key | Metric name | Unit | Description | Supported instance types |
|---|---|---|---|---|---|
| Used disk space | MongoDB_DetailedSpaceUsage | ins_size | Bytes | Total disk space in use. For local disk instances, this is the sum of data disk and log disk space. For cloud disk instances, it also includes file system metadata. | Standalone, replica set, sharded cluster |
| Used data disk space | MongoDB_DetailedSpaceUsage | data_size | Bytes | Space used by the data disk, excluding the local database. Includes physical data files (prefixed with "collection"), index files (prefixed with "index"), and metadata files such as WiredTiger.wt. | Standalone, replica set, sharded cluster |
| Used log disk space | MongoDB_DetailedSpaceUsage | log_size | Bytes | Physical size of the local database. | Standalone, replica set, sharded cluster |
IOPS and disk throughput
| Metric | Key | Metric name | Unit | Description | Supported instance types |
|---|---|---|---|---|---|
| IOPS usage | MongoDB_IOPS | iops | times/s | Current IOPS usage. The data_iops and log_iops metrics from earlier monitoring versions are merged into this metric. Note Replica set and sharded cluster instances running MongoDB 4.2 with cloud disks do not support this metric. | Standalone, replica set, sharded cluster |
| IOPS usage rate | IOPSUsage | iops_usage | % | The ratio of current IOPS usage to the maximum IOPS for the instance type. If this value reaches or approaches 100%, the instance may respond slowly or become unavailable. See High IOPS usage for causes and solutions. Note Not supported for replica set and sharded cluster instances running MongoDB 4.2 with cloud disks. | Standalone, replica set, sharded cluster |
| Disk read throughput | MongoDB_Disk_Detail | read_io_bandwidth_mbps | MB/s | Rate of data read from disk. | Standalone, replica set, sharded cluster |
| Disk write throughput | MongoDB_Disk_Detail | write_io_bandwidth_mbps | MB/s | Rate of data written to disk. | Standalone, replica set, sharded cluster |
| Total disk throughput | MongoDB_Disk_Detail | io_bandwidth_mbps | MB/s | Sum of disk read and write throughput. | Standalone, replica set, sharded cluster |
| BPS usage rate | MongoDB_MbpsUsage | total_mbps_usage | % | The ratio of total disk throughput to the maximum BPS for the instance type. If this value reaches or approaches 100%, the instance may respond slowly or become unavailable. For cloud disk BPS limits, see Instance types. Note Supported only for cloud disk instances. | Standalone, replica set, sharded cluster (shard nodes only) |
Connections
| Metric | Key | Metric name | Unit | Description | Supported instance types |
|---|---|---|---|---|---|
| Current active connections | MongoDB_TotalConns | connections_active | count | The number of client connections currently performing operations. | Standalone, replica set, sharded cluster |
| Current connections | MongoDB_TotalConns | current_conn | count | The total number of client connections to the server. Includes connections from other replica set nodes and connections between mongos and shard nodes. | Standalone, replica set, sharded cluster |
| New connections per second | MongoDB_TotalConns | connections_totalCreated_ps | count | Total new connections established per second. | Standalone, replica set, sharded cluster |
| Available connections | MongoDB_TotalConns | connections_available | count | The number of connections available for new clients. | Standalone, replica set, sharded cluster |
| Connection usage | ConnectionUsage | conn_usage | % | The ratio of current connections to the maximum connections for the instance type. Monitor this metric to determine whether the connection limit is sufficient. The maximum varies by instance type — see Instance types. To increase the limit, change the instance configuration. Alternatively, adjust the number of client connections by following Query and limit the number of connections. | Standalone, replica set, sharded cluster |
Network traffic
| Metric | Key | Metric name | Unit | Description | Supported instance types |
|---|---|---|---|---|---|
| Inbound traffic | MongoDB_Network | bytes_in | Bytes | Inbound network traffic. | Standalone, replica set, sharded cluster, Serverless |
| Outbound traffic | MongoDB_Network | bytes_out | Bytes | Outbound network traffic. | Standalone, replica set, sharded cluster, Serverless |
| Requests processed | MongoDB_Network | num_requests | count | Total number of requests processed. | Standalone, replica set, sharded cluster, Serverless |
Operation QPS
All sub-metrics in MongoDB_Opcounters count all operations received by the instance, regardless of whether they succeeded. Bulk.insert() batch operations count as a single operation. For per-document counts, see the Number of affected documents section. For background on how opcounters work, see Opcounters and Repl Opcounters metrics.
| Metric | Key | Metric name | Unit | Supported instance types |
|---|---|---|---|---|
| Insert QPS | MongoDB_Opcounters | insert | count | Standalone, replica set, sharded cluster, Serverless |
| Query QPS | MongoDB_Opcounters | query | count | Standalone, replica set, sharded cluster, Serverless |
| Update QPS | MongoDB_Opcounters | update | count | Standalone, replica set, sharded cluster, Serverless |
| Delete QPS | MongoDB_Opcounters | delete | count | Standalone, replica set, sharded cluster, Serverless |
| Getmore QPS | MongoDB_Opcounters | getmore | count | Standalone, replica set, sharded cluster, Serverless |
| Command QPS | MongoDB_Opcounters | command | count | Standalone, replica set, sharded cluster, Serverless |
Average response time
| Metric | Key | Metric name | Unit | Description | Supported instance types |
|---|---|---|---|---|---|
| Total average response time | MongoDB_RT | avg_rt | μs | Overall average response time across all operation types. | Standalone, replica set, sharded cluster |
| Read response time | MongoDB_RT | reads_avg_rt | μs | Average response time for read operations. | Standalone, replica set, sharded cluster |
| Write response time | MongoDB_RT | writes_avg_rt | μs | Average response time for write operations. | Standalone, replica set, sharded cluster |
| Command response time | MongoDB_RT | commands_avg_rt | μs | Average response time for command operations. | Standalone, replica set, sharded cluster |
| Transaction response time | MongoDB_RT | trans_avg_rt | μs | Average response time for transaction operations. | Standalone, replica set, sharded cluster |
Operation latency
| Metric | Key | Metric name | Unit | Description | Supported instance types |
|---|---|---|---|---|---|
| Read request latency | MongoDB_Latencies | reads_latency_ps | μs | Latency of all successful read requests. | Standalone, replica set, sharded cluster |
| Write request latency | MongoDB_Latencies | writes_latency_ps | μs | Latency of all successful write requests. | Standalone, replica set, sharded cluster |
| Command latency | MongoDB_Latencies | commands_latency_ps | μs | Latency of all successful command requests. | Standalone, replica set, sharded cluster |
| Transaction latency | MongoDB_Latencies | trans_latency_ps | μs | Processing time for all successful transaction requests. | Standalone, replica set, sharded cluster |
Number of affected documents
| Metric | Key | Metric name | Unit | Description | Supported instance types |
|---|---|---|---|---|---|
| Documents deleted | MongoDB_Documents | document_deleted_ps | count | Number of documents deleted per second. | Standalone, replica set, sharded cluster |
| Documents inserted | MongoDB_Documents | document_inserted_ps | count | Number of documents inserted per second. | Standalone, replica set, sharded cluster |
| Documents returned | MongoDB_Documents | document_returned_ps | count | Number of documents returned per second. | Standalone, replica set, sharded cluster |
| Documents updated | MongoDB_Documents | document_updated_ps | count | Number of documents updated per second. | Standalone, replica set, sharded cluster |
Query executors
| Metric | Key | Metric name | Unit | Description | Supported instance types |
|---|---|---|---|---|---|
| Documents scanned | MongoDB_QueryExecutors | queryExecutor_scannedObject_ps | count | Total documents scanned during query execution and plan evaluation. Equivalent to totalDocsExamined in explain() output. A large value means the database is scanning many non-indexed entries — add an index for fields with high scan counts. | Standalone, replica set, sharded cluster |
| Index entries scanned | MongoDB_QueryExecutors | queryExecutor_scanned_ps | count | Total index entries scanned during query execution and plan evaluation. Equivalent to totalKeysExamined in explain() output. If this is large but the number of returned documents is small, the index is inefficient — adjust existing indexes or create new ones. | Standalone, replica set, sharded cluster |
Operation details
| Metric | Key | Metric name | Unit | Description | Supported instance types |
|---|---|---|---|---|---|
| Count operations for a specific ID | MongoDB_OperationDetails | operation_exactIDCount_ps | count | Number of single update operations that use _id instead of a shard key on a sharded collection distributed across multiple shards. Each such operation traverses all chunks. A large chunk count can lead to full CPU utilization. | Standalone, replica set, sharded cluster |
| Sort operations without an index | MongoDB_OperationDetails | operation_scanAndOrder_ps | count | Sorted queries that cannot use an index for sorting. A high value degrades performance. See Best practices for creating indexes for solutions. | Standalone, replica set, sharded cluster |
| Write conflicts | MongoDB_OperationDetails | operation_writeConflicts_ps | count | Queries that encountered write conflicts. A small number has minimal impact, but a sustained high value degrades database performance. | Standalone, replica set, sharded cluster |
GlobalLock
| Metric | Key | Metric name | Unit | Description | Supported instance types |
|---|---|---|---|---|---|
| Active readers | MongoDB_GlobalLocks | gl_ac_readers | count | Active client connections performing read operations. | Standalone, replica set, sharded cluster |
| Active writers | MongoDB_GlobalLocks | gl_ac_writers | count | Active client connections performing write operations. | Standalone, replica set, sharded cluster |
| Operations queued for a write lock | MongoDB_GlobalLocks | gl_cq_writers | count | Operations waiting for a write lock. | Standalone, replica set, sharded cluster |
| Operations queued for a read lock | MongoDB_GlobalLocks | gl_cq_readers | count | Operations waiting for a read lock. | Standalone, replica set, sharded cluster |
| Total operations queued for a lock | MongoDB_GlobalLocks | gl_cq_total | count | Sum of operations queued for both read and write locks. A large value means client operations are delayed, which increases application response time. | Standalone, replica set, sharded cluster |
Cursors
| Metric | Key | Metric name | Unit | Description | Supported instance types |
|---|---|---|---|---|---|
| Open cursors | MongoDB_AllCursors | total_open | count | Total number of currently open cursors. | Standalone, replica set, sharded cluster (shard and ConfigServer nodes only) |
| Cursors closed due to timeout | MongoDB_AllCursors | timed_out | count | Number of cursors that timed out and were closed. A large value indicates that client-side data-processing code may not be closing cursors promptly. | Standalone, replica set, sharded cluster (shard and ConfigServer nodes only) |
| Cursors closed due to session closure | MongoDB_AllCursors | job_cursors_closed | count | Number of cursors closed because their session was closed. | Standalone, replica set, sharded cluster (shard and ConfigServer nodes only) |
| Pinned cursors | MongoDB_AllCursors | pinned_open | count | Cursors currently pinned to prevent deletion while fetching the next batch. For example, find and getMore operations pin a cursor while fetching results, then unpin it after returning results. | Standalone, replica set, sharded cluster (shard and ConfigServer nodes only) |
| Non-timed-out cursors | MongoDB_AllCursors | noTimeout_open | count | Open cursors using the noCursorTimeout option. This option prevents a cursor from timing out after a period of inactivity, but the session timeout still applies. See the noCursorTimeout documentation for details. | Standalone, replica set, sharded cluster (shard and ConfigServer nodes only) |
Transactions
| Metric | Key | Metric name | Unit | Description | Supported instance types |
|---|---|---|---|---|---|
| Prepared transactions | MongoDB_Transactions | trans_totalPrepared_ps | count | Number of transactions in the prepared state. | Replica set, sharded cluster (shard nodes only) |
| Prepared transactions committed | MongoDB_Transactions | trans_totalPreparedThenCommited_ps | count | Prepared transactions that were successfully committed. | Replica set, sharded cluster (shard nodes only) |
| Prepared transactions rolled back | MongoDB_Transactions | trans_totalPreparedThenAborted_ps | count | Prepared transactions that were successfully rolled back. | Replica set, sharded cluster (shard nodes only) |
| Started transactions | MongoDB_Transactions | trans_totalStarted_ps | count | Number of transactions started. | Standalone, replica set, sharded cluster |
| Committed transactions | MongoDB_Transactions | trans_totalCommited_ps | count | Transactions successfully committed. | Standalone, replica set, sharded cluster |
| Rolled back transactions | MongoDB_Transactions | trans_totalAborted_ps | count | Transactions successfully rolled back. | Standalone, replica set, sharded cluster |
TTL
| Metric | Key | Metric name | Unit | Description | Supported instance types |
|---|---|---|---|---|---|
| Documents deleted by TTL index | MongoDB_TTLs | ttl_deletedDocuments_ps | count | Documents deleted per second by TTL indexes. A large value indicates heavy TTL deletion activity, which may affect instance performance. See the TTL index documentation. | Standalone, replica set, sharded cluster |
| TTL background thread passes | MongoDB_TTLs | ttl_passes_ps | count | Number of times the TTL background process checked for expired documents. Each pass, the TTL monitor attempts to delete as many eligible documents as possible from all TTL indexes. | Standalone, replica set, sharded cluster |
Repl Opcounters
During replication, MongoDB serializes operations, which can affect per-operation counts. As a result, values for MongoDB_ReplOpcounters may differ from MongoDB_Opcounters. For background, see Opcounters and Repl Opcounters metrics.
| Metric | Key | Metric name | Unit | Supported instance types |
|---|---|---|---|---|
| Replication command operations | MongoDB_ReplOpcounters | repl_command | count | Replica set, sharded cluster |
| Replication delete operations | MongoDB_ReplOpcounters | repl_delete | count | Replica set, sharded cluster |
| Replication getmore operations | MongoDB_ReplOpcounters | repl_getmore | count | Replica set, sharded cluster |
| Replication insert operations | MongoDB_ReplOpcounters | repl_insert | count | Replica set, sharded cluster |
| Replication query operations | MongoDB_ReplOpcounters | repl_query | count | Replica set, sharded cluster |
| Replication update operations | MongoDB_ReplOpcounters | repl_update | count | Replica set, sharded cluster |
Primary-secondary latency
| Metric | Key | Metric name | Unit | Description | Supported instance types |
|---|---|---|---|---|---|
| Replication lag | MongoDB_Repl_Lag | repl_lag | s | Data synchronization latency between the primary and secondary nodes. The heartbeat interval between replica set members is 2 seconds, so a repl_lag value between -2 and 2 is normal. A negative value for a secondary node does not mean it is ahead of the primary. For the current replication status, run rs.printSecondaryReplicationInfo() on the primary node. | Replica set, sharded cluster (shard and ConfigServer nodes only) |
Oplog
| Metric | Key | Metric name | Unit | Description | Supported instance types |
|---|---|---|---|---|---|
| Oplog retention period | MongoDB_OplogTimeInterval | oplog_time_interval | Hours | How long the oplog retains entries. For MongoDB 4.4 and later, set the storage.oplogMinRetentionHours parameter on the instance product page. | Replica set, sharded cluster |
Replication buffer
| Metric | Key | Metric name | Unit | Description | Supported instance types |
|---|---|---|---|---|---|
| Current replication buffer size | MongoDB_Repl_Buffer | repl_buffer_size | MB | Current size of the replication buffer in the replica set. | Replica set, sharded cluster |
| Maximum replication buffer size | MongoDB_Repl_Buffer | repl_buffer_max_size | MB | Maximum size of the replication buffer in the replica set. | Replica set, sharded cluster |
WiredTiger cache
| Metric | Key | Metric name | Unit | Description | Supported instance types |
|---|---|---|---|---|---|
| Bytes read into cache | MongoDB_Wt_Cache | bytes_read_into_cache | Bytes | Data read from disk into the WiredTiger cache. | Standalone, replica set, sharded cluster |
| Bytes written from cache | MongoDB_Wt_Cache | bytes_written_from_cache | Bytes | Data written from the WiredTiger cache to disk. | Standalone, replica set, sharded cluster |
| Maximum cache size | MongoDB_Wt_Cache | maximum_bytes_configured | Bytes | Maximum bytes configured for the WiredTiger cache. ApsaraDB for MongoDB sets the WiredTiger cache size to approximately 60% of the requested instance memory for compatibility and security. See High memory usage. | Standalone, replica set, sharded cluster |
| WiredTiger cache usage | MongoDB_WTCacheUsage | wt_cache_usage | % | Percentage of the maximum cache size currently in use. Monitor this to detect memory pressure. See High memory usage. | Standalone, replica set, sharded cluster |
| WiredTiger dirty cache usage | MongoDB_WTCacheUsage | wt_cache_dirty_usage | % | Percentage of the cache occupied by dirty pages (modified in memory but not yet flushed to disk). A sustained high value in write-heavy workloads indicates data waiting to be flushed. See High memory usage. | Standalone, replica set, sharded cluster |
| WiredTiger update cache utilization | MongoDB_WTCacheUsage | wt_cache_updates_usage | % | Proportion of the maximum cache size allocated for update operations. | Standalone, replica set, sharded cluster |
WT concurrent transactions
Before MongoDB 7.0, the limit for concurrent read and write transactions was 128. If the availability counter stayed at 0 for an extended period, it indicated overload. Starting in MongoDB 7.0, the database dynamically adjusts the maximum number of concurrent storage engine transactions to optimize throughput — a sustained availability of 0 no longer necessarily indicates overload. See the MongoDB 7.0 release notes.
| Metric | Key | Metric name | Unit | Supported instance types |
|---|---|---|---|---|
| Current concurrent write transactions | MongoDB_Wt_Concurrent_Trans | write_concurrent_trans_out | count | Standalone, replica set, sharded cluster |
| Available concurrent write transactions | MongoDB_Wt_Concurrent_Trans | write_concurrent_trans_available | count | Standalone, replica set, sharded cluster |
| Current concurrent read transactions | MongoDB_Wt_Concurrent_Trans | read_concurrent_trans_out | count | Standalone, replica set, sharded cluster |
| Available concurrent read transactions | MongoDB_Wt_Concurrent_Trans | read_concurrent_trans_available | count | Standalone, replica set, sharded cluster |
WiredTiger lock acquisitions
| Metric | Key | Metric name | Unit | Description | Supported instance types |
|---|---|---|---|---|---|
| Checkpoint lock acquisitions | MongoDB_WtLockAcquisitions | wt_checkPoint_lock | count | Number of checkpoint lock acquisitions. | Standalone, replica set, sharded cluster |
| Data handle read lock acquisitions | MongoDB_WtLockAcquisitions | wt_dhandle_read_lock | count | Instances with too many databases and collections can cause clients to wait long periods for a handle lock, affecting performance. See Instance stuttering caused by too many collections. | Standalone, replica set, sharded cluster |
| Data handle write lock acquisitions | MongoDB_WtLockAcquisitions | wt_dhandle_write_lock | count | Number of write lock acquisitions for data handles. | Standalone, replica set, sharded cluster |
| Metadata lock acquisitions | MongoDB_WtLockAcquisitions | wt_metadata_lock | count | Number of metadata lock acquisitions. | Standalone, replica set, sharded cluster |
| Schema lock acquisitions | MongoDB_WtLockAcquisitions | wt_schema_lock | count | Frequent creation or deletion of databases, collections, or indexes — as well as having too many of them — increases schema lock overhead and affects performance. See Instance stuttering caused by too many collections. | Standalone, replica set, sharded cluster |
| Table read lock acquisitions | MongoDB_WtLockAcquisitions | wt_table_read_lock | count | Number of table read lock acquisitions. | Standalone, replica set, sharded cluster |
| Table write lock acquisitions | MongoDB_WtLockAcquisitions | wt_table_write_lock | count | Number of table write lock acquisitions. | Standalone, replica set, sharded cluster |
| Transaction global read lock acquisitions | MongoDB_WtLockAcquisitions | wt_txn_global_read_lock | count | Number of global read lock acquisitions for transactions. | Standalone, replica set, sharded cluster |
| Transaction global write lock acquisitions | MongoDB_WtLockAcquisitions | wt_txn_global_write_lock | count | Number of global write lock acquisitions for transactions. | Standalone, replica set, sharded cluster |
WiredTiger cache page evictions
| Metric | Key | Metric name | Unit | Description | Supported instance types |
|---|---|---|---|---|---|
| Pages forcibly evicted | MongoDB_WtCacheEviction | pages_selected_count | count | Number of pages forcibly evicted from the WiredTiger cache. | Standalone, replica set, sharded cluster |
| Pages that cannot be evicted | MongoDB_WtCacheEviction | pages_selected_unable_to_evict_count | count | Number of pages selected for eviction that could not be evicted. | Standalone, replica set, sharded cluster |
| Page evictions blocked by hazard pointers | MongoDB_WtCacheEviction | hazard_pointer_blocked_page_eviction | count | Number of page evictions blocked because of hazard pointers. | Standalone, replica set, sharded cluster |
| Maximum page size during eviction | MongoDB_WtCacheEviction | max_page_size | MB | The largest page size encountered during the eviction process. | Standalone, replica set, sharded cluster |
| Pages evicted by user threads | MongoDB_WtCacheEviction | pages_evicted_by_application_threads | count | Number of WiredTiger cache pages evicted by application (user) threads. | Standalone, replica set, sharded cluster |
Eviction scan count
| Metric | Key | Metric name | Unit | Description | Supported instance types |
|---|---|---|---|---|---|
| Hazard pointer array scanned during eviction | MongoDB_WtCacheHPCheckEntriesWalked | wiredTiger_cache_hazardPointerCheckEntriesWalked | count | Items in the hazard pointer array scanned during eviction. A large value indicates that many page evictions were blocked by hazard pointers. | Standalone, replica set, sharded cluster |
Thread yielding
| Metric | Key | Metric name | Unit | Description | Supported instance types |
|---|---|---|---|---|---|
| Blocked waiting for page eviction | MongoDB_WtCache_Thread_Yield | page_acquire_eviction_blocked | count | Number of times a thread was blocked waiting for page eviction to complete. | Standalone, replica set, sharded cluster |
| Waits for a locked target page | MongoDB_WtCache_Thread_Yield | page_acquire_locked_blocked | count | Number of times a thread waited for a locked target page. | Standalone, replica set, sharded cluster |
| Total thread sleep duration during page fetch | MongoDB_WtCache_Thread_Yield | page_acquire_time_sleeping | μs | Total time threads spent sleeping while waiting to fetch a page. | Standalone, replica set, sharded cluster |
Write concern
| Metric | Key | Metric name | Unit | Description | Supported instance types |
|---|---|---|---|---|---|
| Average write concern latency | MongoDB_GetLastErrorWtime | metrics_getLastError_avg_wtime | ms | Average time to complete a write concern operation. | Standalone, replica set, sharded cluster (mongod only) |
| Write concern timeouts | MongoDB_GetLastErrorWtime | metrics_getLastError_wtimeouts | count | Number of write concern operations that exceeded the wtimeout threshold. | Standalone, replica set, sharded cluster |
Data handles
| Metric | Key | Metric name | Unit | Description | Supported instance types |
|---|---|---|---|---|---|
| Active handle count | MongoDB_DataHandle | opened_fd_num | count | Number of active connection data handles in the WiredTiger cache. | Standalone, replica set, sharded cluster |
| Closed handle count | MongoDB_DataHandle | closed_fd_num | count | Number of closed data handles scanned in the WiredTiger cache. | Standalone, replica set, sharded cluster |
| Memory used by active handles | MongoDB_DataHandle | opened_fd_mem | MB | Memory consumed by currently active connection data handles in the WiredTiger cache. | Standalone, replica set, sharded cluster |
Assertions
| Metric | Key | Metric name | Unit | Description | Supported instance types |
|---|---|---|---|---|---|
| Normal assertions | MongoDB_Asserts | Regular | count | Number of assertions that passed. | Standalone, replica set, sharded cluster |
| Warning assertions | MongoDB_Asserts | warning | count | Number of warning-level assertions. This value is always 0. | Standalone, replica set, sharded cluster |
| Message assertions | MongoDB_Asserts | msg | count | Number of message-level assertions. | Standalone, replica set, sharded cluster |
| User assertions | MongoDB_Asserts | user | count | Number of user-level assertions. | Standalone, replica set, sharded cluster |
TCMalloc
| Metric | Key | Metric name | Unit | Description | Supported instance types |
|---|---|---|---|---|---|
| TCMalloc memory fragmentation ratio | MongoDB_TcmallocCacheMemRatio | tcmalloc_cache_mem_ratio | % | Memory fragmentation ratio reported by TCMalloc. Monitor this to detect inefficient memory allocation patterns. | Standalone, replica set, sharded cluster |
moveChunk
| Metric | Key | Metric name | Unit | Description | Supported instance types |
|---|---|---|---|---|---|
| Migrations as source | MongoDB_MoveChunks | moveChunk_donor_started_ps | count | Number of times the current node acted as the migration source. This counter increments regardless of whether the migration succeeded. | Sharded cluster (shard nodes only) |
| Migrations as target | MongoDB_MoveChunks | moveChunk_recip_stared_ps | count | Number of times the current node acted as the migration target. | Sharded cluster (shard nodes only) |
| Pending chunk range deletion tasks | MongoDB_MoveChunks | moveChunk_deleter_task | count | Number of chunk range deletion tasks that are pending or running. | Sharded cluster |
Query executor information
| Metric | Key | Metric name | Unit | Description | Supported instance types |
|---|---|---|---|---|---|
| Full table scans (non-tailable cursors) | MongoDB_QueryExecutors | collscans_nontailable | count | Number of full collection scans for non-tailable cursors. | Replica set, sharded cluster (excluding mongos) |
| Total full table scans | MongoDB_QueryExecutors | collscans_total | count | Total number of full collection scans. | Replica set, sharded cluster (excluding mongos) |
Number of databases and collections
| Metric | Key | Metric name | Unit | Description | Supported instance types |
|---|---|---|---|---|---|
| User collections in admin database | MongoDB_CollectionNums | admin_user_coll | count | Number of user collections in the admin database. | Replica set (versions 4.2 and earlier), sharded clusters |
Classic multi-planner
| Metric | Key | Metric name | Unit | Description | Supported instance types |
|---|---|---|---|---|---|
| Classic multi-planner tasks | MongoDB_MultiPlanner_Worker | metrics_query_multiplanner_classicworks | count | Total tasks executed by the classic multi-planner. | Replica set, sharded cluster (mongod only) |
Logical session cache
| Metric | Key | Metric name | Unit | Description | Supported instance types |
|---|---|---|---|---|---|
| Logical sessions in cache | MongoDB_LogicalSession | active_sessions_count | count | Total logical sessions in the cache since the last refresh. | Replica set, sharded cluster |
Serverless
| Metric | Key | Metric name | Unit | Description | Supported instance types |
|---|---|---|---|---|---|
| Accesses per second | — | sl_qps | count | Number of item accesses per second. | Serverless |
Node monitoring (formerly basic monitoring)
For the metrics available for your instance type, see the console.
Node monitoring exposes the same metrics as instance monitoring. All metric groups, keys, descriptions, and supported instance types listed in the Instance monitoring section apply here.
Advanced monitoring
Advanced monitoring is supported only for standalone, replica set, and sharded cluster instances. For the specific metrics available for your instance type, see the console.
| Supported instances | Metric | Metric name | Unit | Description |
|---|---|---|---|---|
| Standalone, replica set, sharded cluster | CPU usage | cpu_usage | % | CPU usage of the instance. |
| Memory usage | mem_usage | % | Memory usage of the instance. | |
| Used disk space | ins_size | Bytes | Total disk space used. | |
| Used data disk space | data_size | Bytes | Data disk space used. | |
| Used log disk space | log_size | Bytes | Log disk space used. | |
| Connection usage | conn_usage | % | Ratio of current connections to the maximum connections. | |
| Open non-timed-out cursors | open_no_timedout | count | Number of open cursors without a timeout. | |
| Pinned cursors | pinned_open | count | Number of cursors currently in use. | |
| Open cursors (total) | open_total | count | Total number of open cursors. | |
| Cursors closed by timeout | closed_by_timeout | count | Cursors closed because they timed out. | |
| Cursors closed by session | closed_by_session | count | Cursors closed because their session was closed. | |
| Operations waiting for a lock (total) | currentQueue_total | count | Total operations waiting for a lock. | |
| Operations waiting for a read lock | currentQueue_readers | count | Operations waiting for a read lock. | |
| Operations waiting for a write lock | currentQueue_writers | count | Operations waiting for a write lock. | |
| Active reader connections | active_readers | count | Active client connections performing read operations. | |
| Active writer connections | active_writers | count | Active client connections performing write operations. | |
| Total average response time | avg_RT | μs | Overall average response time. | |
| Read response time | reads_avg_rt | μs | Average response time for read operations. | |
| Write response time | writes_avg_rt | μs | Average response time for write operations. | |
| Command response time | commands_avg_rt | μs | Average response time for command operations. | |
| Transaction response time | trans_avg_rt | μs | Average response time for transaction operations. | |
| Current concurrent write requests | write_concurrent_trans_out | count | Number of concurrent write requests in the WiredTiger request queue. | |
| Current concurrent read requests | read_concurrent_trans_out | count | Number of concurrent read requests in the WiredTiger request queue. | |
| Available concurrent write requests | write_concurrent_trans_available | count | Available slots for concurrent write requests. | |
| Available concurrent read requests | read_concurrent_trans_available | count | Available slots for concurrent read requests. | |
| I/O latency | iocheck_cost | ms | Current I/O response performance. Note Supported only for standalone instances and replica set instances running MongoDB 4.0 or earlier. | |
| WiredTiger cache usage | wt_cache_usage | % | WiredTiger cache usage. | |
| WiredTiger dirty cache usage | wt_cache_dirty_usage | % | WiredTiger dirty cache usage. | |
| Documents deleted | deletedDocuments | count | Number of documents deleted. | |
| Documents inserted | insertedDocuments | count | Number of documents inserted. | |
| Documents returned | returnDocuments | count | Number of documents returned. | |
| Documents updated | updatedDocuments | count | Number of documents updated. | |
| Sort operations without an index | scanAndOrder | count | Requests that cannot use an index for sorting. | |
| Write conflicts | writeConflicts | count | Number of write conflicts. | |
| Count operations for a specific ID | exactIDCount | count | Requests that must broadcast to get matching _id information. | |
| Index keys scanned | scannedKeys | count | Index keys scanned during queries. | |
| Documents scanned | scannedDocs | count | Documents scanned during queries. | |
| Documents deleted by TTL index | ttlDeletedDocuments | count | Documents deleted by a TTL index. | |
| TTL background thread passes | ttlPasses | count | Number of times the background TTL thread performed deletions. | |
| Schema lock acquisitions | wiredTiger_schema_lock_delta | count | Number of schema lock acquisitions. | |
| Metadata lock acquisitions | wiredTiger_metadata_lock_delta | count | Number of metadata lock acquisitions. | |
| Table read lock acquisitions | wiredTiger_table_read_lock_delta | count | Number of table read lock acquisitions. | |
| Table write lock acquisitions | wiredTiger_table_write_lock_delta | count | Number of table write lock acquisitions. | |
| Transaction global read lock acquisitions | wiredTiger_txn_global_read_lock_delta | count | Number of global read lock acquisitions for transactions. | |
| Transaction global write lock acquisitions | wiredTiger_txn_global_write_lock_delta | count | Number of global write lock acquisitions for transactions. | |
| Disk read throughput | read_io_bandwidth_mbps | MB/s | Rate of data read from disk. | |
| Disk write throughput | write_io_bandwidth_mbps | MB/s | Rate of data written to disk. | |
| Total disk throughput | io_bandwidth_mbps | MB/s | Total disk read and write throughput. | |
| Prepared transactions | trans_totalPrepared_ps | count | Number of prepared transactions. | |
| Prepared transactions committed | trans_totalPreparedThenCommited_ps | count | Prepared transactions successfully committed. | |
| Prepared transactions rolled back | trans_totalPreparedThenAborted_ps | count | Prepared transactions successfully rolled back. | |
| Started transactions | trans_totalStarted_ps | count | Number of started transactions. | |
| Committed transactions | trans_totalCommited_ps | count | Transactions successfully committed. | |
| Rolled back transactions | trans_totalAborted_ps | count | Transactions successfully rolled back. | |
| BPS usage rate | total_mbps_usage | % | Disk read/write bandwidth usage rate. Note Supported only for disk-based instances. For sharded cluster instances, valid only for the shard component. | |
| Bytes read into cache | bytes_read_into_cache | Bytes | Data read into the WiredTiger cache. | |
| Bytes written from cache | bytes_written_from_cache | Bytes | Data written from the WiredTiger cache to disk. | |
| Maximum cache size | maximum_bytes_configured | Bytes | Maximum configured WiredTiger cache size. | |
| Disk usage | disk_usage | % | Ratio of total disk space used to the maximum available. | |
| Insert QPS | insert | count | Number of insert operations per second. | |
| Query QPS | query | count | Number of query operations per second. | |
| Update QPS | update | count | Number of update operations per second. | |
| Delete QPS | delete | count | Number of delete operations per second. | |
| Getmore QPS | getmore | count | Number of getmore operations per second. | |
| Command QPS | command | count | Number of command operations per second. | |
| Current connections | current_conn | count | Total current connections to the instance. | |
| Active connections | active_conn | count | Active connections to the instance. | |
| Inbound traffic | bytes_in | Bytes | Inbound network traffic. | |
| Outbound traffic | bytes_out | Bytes | Outbound network traffic. | |
| Replica set, sharded cluster | IOPS usage | data_iops(iops) | times/s | IOPS usage. The data_iops and log_iops metrics from earlier monitoring versions are merged into this metric. Note Not supported for disk-based instances running MongoDB 4.2. |
| IOPS usage rate | iops_usage | % | Ratio of IOPS used to maximum available IOPS. Note Not supported for disk-based instances running MongoDB 4.2. | |
| Replication lag | repl_lag | s | Data synchronization latency between primary and secondary nodes. A heartbeat interval of 2 seconds means a value between -2 and 2 is normal. A negative value for a secondary node does not mean it is ahead of the primary. Run rs.printSecondaryReplicationInfo() on the primary node to get the current status. | |
| Sharded cluster | Primary node insert QPS | insert_primary | count | Insert operations on the primary node. |
| Primary node query QPS | query_primary | count | Query operations on the primary node. | |
| Primary node update QPS | update_primary | count | Update operations on the primary node. | |
| Primary node delete QPS | delete_primary | count | Delete operations on the primary node. | |
| Primary node getmore QPS | getmore_primary | count | Getmore operations on the primary node. | |
| Primary node command QPS | command_primary | count | Command operations on the primary node. | |
| Secondary node insert QPS | insert_secondary | count | Insert operations on secondary nodes. | |
| Secondary node query QPS | query_secondary | count | Query operations on secondary nodes. | |
| Hidden node insert QPS | insert_hidden | count | Insert operations on hidden nodes. | |
| Hidden node query QPS | query_hidden | count | Query operations on hidden nodes. | |
| Hidden node update QPS | update_hidden | count | Update operations on hidden nodes. | |
| Hidden node delete QPS | delete_hidden | count | Delete operations on hidden nodes. | |
| Hidden node getmore QPS | getmore_hidden | count | Getmore operations on hidden nodes. | |
| Hidden node command QPS | command_hidden | count | Command operations on hidden nodes. | |
| Mongos insert QPS | insert | count | Insert operations on the mongos component. | |
| Mongos query QPS | query | count | Query operations on the mongos component. | |
| Mongos update QPS | update | count | Update operations on the mongos component. | |
| Mongos delete QPS | delete | count | Delete operations on the mongos component. | |
| Mongos getmore QPS | getmore | count | Getmore operations on the mongos component. | |
| Mongos command QPS | command | count | Command operations on the mongos component. | |
| moveChunk — times as source | donorCount | count | Number of times the node acted as the source for a moveChunk or moveRange operation. | |
| moveChunk — times as target | recipientCount | count | Number of times the node acted as the destination shard to receive chunks. |
Performance Trend
For the metrics available for each instance type, see the console.
| Supported instances | Metric | Metric IDs and descriptions |
|---|---|---|
| Standalone, replica set, sharded cluster | CPU usage | mongodb.cpu_usage: CPU usage of the instance. |
| Memory usage | mongodb.mem_usage: Memory usage of the instance. | |
| Disk space usage | mongodb.detailed_space_usage.ins_size: Total disk space used. mongodb.detailed_space_usage.data_size: Data disk space used. mongodb.detailed_space_usage.log_size: Log disk space used. | |
| Cursors | mongodb.metrics.cursor.timedOut: Number of cursors that timed out. mongodb.metrics.cursor.open.total: Number of currently open cursors. | |
| WiredTiger request queue | mongodb.wiredTiger.write_concurrent_trans_out: Concurrent write requests. mongodb.wiredTiger.read_concurrent_trans_out: Concurrent read requests. mongodb.wiredTiger.write_concurrent_trans_available: Available concurrent write slots. mongodb.wiredTiger.read_concurrent_trans_available: Available concurrent read slots. Note Supported only for Standard Edition replica set instances. | |
| WiredTiger cache | mongodb.wiredTiger.cache.pages.read.into.cache: Data read into the cache. mongodb.wiredTiger.cache.pages.written.from.cache: Data written from the cache. mongodb.wiredTiger.cache.maximum.bytes.configured: Maximum cache size. Note Supported only for Standard Edition replica set instances. | |
| Standalone, replica set, sharded cluster, Serverless | Disk usage | mongodb.disk_usage: Disk usage of the instance. |
| Operation QPS | mongodb.opcounters.insert: Insert operations. mongodb.opcounters.query: Query operations. mongodb.opcounters.update: Update operations. mongodb.opcounters.delete: Delete operations. mongodb.opcounters.getmore: Getmore operations. mongodb.opcounters.command: Command operations. | |
| Connections | mongodb.connections.current: Total current connections to the instance. | |
| Network traffic | mongodb.network.bytesIn: Inbound traffic. mongodb.network.bytesOut: Outbound traffic. mongodb.network.numRequests: Requests processed. | |
| Replica set, sharded cluster | IOPS usage | mongodb.iops.data_iops: Read and write operations on the data disk. mongodb.iops.log_iops: Read and write operations on the log disk. |
| IOPS usage rate | mongodb.iops_usage: IOPS usage rate. Note Not supported for replica set and sharded cluster instances running MongoDB 4.2 with cloud disks. | |
| Replica set | GlobalLock | mongodb.globalLock.currentQueue.total: Total global lock queue length. mongodb.globalLock.currentQueue.writers: Write queue length. mongodb.globalLock.currentQueue.readers: Read queue length. |