This topic describes the metrics for instance monitoring, node monitoring, advanced monitoring, and Performance Trend in ApsaraDB for MongoDB, and explains the meaning of each metric.
To improve readability, byte units in the console are automatically converted to MB, GB, or TB.
Instance monitoring
For information about the metrics supported by different instance types, see the console.
Metric | Key | Metric name | Metric meaning | Unit | Detailed description | Supported instance types |
Disk usage | DiskUsage | disk_usage | Disk usage | % | The percentage of the total disk capacity that is used by the instance. This metric indicates the disk load of the instance. If the disk usage exceeds 80%, change the instance configuration on the instance details page in the console or see Change instance configuration or High disk usage of ApsaraDB for MongoDB instances for solutions. |
|
Network traffic | MongoDB_Network | bytes_in | Inbound network traffic | Bytes | - | |
bytes_out | Outbound network traffic | Bytes | - | |||
num_requests | Number of processed requests | count | - | |||
Operation QPS | MongoDB_Opcounters | insert | Insert operations QPS | count | The MongoDB_Opcounters parameter includes all operations received by the instance, regardless of whether they were executed successfully. Batch operations of the Bulk.insert() type are recorded as a single operation. For more granular records, see the MongoDB_Documents metric. For more information, see Opcounters and Repl Opcounters metrics. | |
query | Query operations QPS | count | ||||
update | Update operations QPS | count | ||||
delete | Delete operations QPS | count | ||||
getmore | Read operations QPS | count | ||||
command | Protocol command operations QPS | count | ||||
Connections | MongoDB_TotalConns | connections_active | Current active connections | count | The number of client connections to the server that are performing operations. | |
current_conn | Current connections | count | The total number of client connections to the server. This includes connections established by other nodes in a replica set or connections established between Mongos and shard nodes. | |||
connections_totalCreated_ps | Total new connections per second | count | - |
| ||
connections_available | Current available connections | count | - | |||
Connection usage | ConnectionUsage | conn_usage | Connection usage | % |
| |
CPU usage | CpuUsage | cpu_usage | CPU usage | % | The sum of system CPU usage and user CPU usage. This metric indicates the service load of the instance. High CPU usage can cause slow data reads and writes, affecting normal services. For troubleshooting, see High CPU usage of ApsaraDB for MongoDB instances. | |
MongoDB_CpuDetail | cpu_sys | System CPU usage | % | - | ||
cpu_user | User CPU usage | % | - | |||
Memory usage | MemoryUsage | mem_usage | Memory usage | % | Memory is mainly occupied by the WiredTiger storage engine, client connections, and request processing. For information about the causes of high memory usage and optimization strategies, see High memory usage of ApsaraDB for MongoDB instances. | |
IOPS usage | MongoDB_IOPS | iops | IOPS usage | times/s |
| |
IOPS usage rate | IOPSUsage | iops_usage | IOPS usage rate | % | The ratio of the instance's IOPS usage to the maximum IOPS of the current instance type. This metric indicates the service load of the instance. If the IOPS usage of a MongoDB instance reaches or approaches 100%, it can cause slow service responses or even service unavailability. High IOPS usage of ApsaraDB for MongoDB instances describes how to view the IOPS usage rate and explains the causes of high IOPS usage and optimization strategies. Note Replica set and sharded cluster instances of ApsaraDB for MongoDB 4.2 that use cloud disks do not support viewing IOPS usage and IOPS usage rate. | |
Disk space usage | MongoDB_DetailedSpaceUsage | ins_size | Used disk space | Bytes |
| |
data_size | Used data disk space | Bytes | The space used by the data disk (excluding the local database). This mainly includes physical data files starting with "collection", physical index files starting with "index", and some physical metadata files, such as WiredTiger.wt. | |||
log_size | Used log disk space | Bytes | The physical size of the local database. | |||
Operation details | MongoDB_OperationDetails | operation_exactIDCount_ps | Number of count operations for a specific ID | count | The number of single update operations that use _id instead of a shard key on a sharded collection whose data is distributed across multiple shards. In current versions, this causes a traversal of all chunks in the instance. If the number of chunks is large, it may lead to full CPU utilization and affect instance performance. | |
operation_scanAndOrder_ps | Number of sort operations without an index | count | The number of sorted queries that cannot use an index to perform the sort operation. A large number can degrade instance performance. Based on your business query conditions, see Best practices for creating indexes in ApsaraDB for MongoDB for solutions. | |||
operation_writeConflicts_ps | Number of write conflicts | count | The number of queries that encountered write conflicts. A small number of write conflicts generally does not have a significant impact. However, many write conflicts can lead to decreased database performance. | |||
BPS | MongoDB_Disk_Detail | read_io_bandwidth_mbps | Disk read throughput | MB/s | - | |
write_io_bandwidth_mbps | Disk write throughput | MB/s | - | |||
io_bandwidth_mbps | Total disk throughput | MB/s | The sum of disk read throughput and disk write throughput. | |||
Transaction operands | MongoDB_Transactions | trans_totalPrepared_ps | Number of prepared transactions | count | - |
|
trans_totalPreparedThenCommited_ps | Number of prepared transactions that were successfully committed | count | - | |||
trans_totalPreparedThenAborted_ps | Number of prepared transactions that were successfully rolled back | count | - | |||
trans_totalStarted_ps | Number of started transactions | count | - |
| ||
trans_totalCommited_ps | Number of successfully committed transactions | count | - | |||
trans_totalAborted_ps | Number of successfully rolled back transactions | count | - | |||
Cursors | MongoDB_AllCursors | total_open | Number of currently open cursors | count | - | |
timed_out | Number of cursors closed due to timeout | count | If this value is large, check the client-side business code that processes data. | |||
job_cursors_closed | Number of cursors closed due to session closure | count | - | |||
pinned_open | Number of currently open and in-use cursors | count | For example, find or getMore operations pin a cursor to prevent it from being deleted while fetching the next batch of results, and unpin it after returning the results. | |||
noTimeout_open | Number of currently open and non-timed-out cursors | count | The number of open and non-timed-out cursors that use the noCursorTimeout option. This option prevents a cursor from timing out after a period of inactivity. However, the noCursorTimeout configuration is limited by the session timeout. For more information, see the documentation. |
| ||
WiredTiger | MongoDB_Wt_Cache | bytes_read_into_cache | Bytes read into cache | Bytes | The number of bytes of data read from disk into the WiredTiger cache. | |
bytes_written_from_cache | Bytes written from cache | Bytes | The number of bytes of data written from the WiredTiger cache to disk. | |||
maximum_bytes_configured | Maximum cache size | Bytes | The maximum number of bytes configured for the WiredTiger cache. For compatibility and security, ApsaraDB for MongoDB sets the CacheSize of the WiredTiger storage engine to about 60% of the requested instance memory size. For more information, see High memory usage of ApsaraDB for MongoDB instances. | |||
WT concurrent transactions | MongoDB_Wt_Concurrent_Trans | write_concurrent_trans_out | Current concurrent write transactions | count | Before V7.0, the limit for concurrent read and write transactions for an instance was 128. If the availability parameter was 0 for a long time, it could indicate an overload. Starting from V7.0, MongoDB uses a default algorithm to dynamically adjust the maximum number of concurrent storage engine transactions to optimize database throughput during overload. An availability parameter of 0 for a long time does not necessarily indicate an overload. For more information, see the documentation. | |
write_concurrent_trans_available | Available concurrent write transactions | count | ||||
read_concurrent_trans_out | Current concurrent read transactions | count | ||||
read_concurrent_trans_available | Available concurrent read transactions | count | ||||
WiredTigerUsage | MongoDB_WTCacheUsage | wt_cache_dirty_usage | WiredTiger dirty cache usage | % | For more information, see High memory usage of ApsaraDB for MongoDB instances. | |
wt_cache_usage | WiredTiger cache usage | % | ||||
Average response time | MongoDB_RT | avg_rt | Total average response time | μs | - | |
reads_avg_rt | Average response time for read operations | μs | - | |||
writes_avg_rt | Average response time for write operations | μs | - | |||
commands_avg_rt | Average response time for command operations | μs | - | |||
trans_avg_rt | Average response time for transaction operations | μs | - | |||
Number of affected documents | MongoDB_Documents | document_deleted_ps | Number of deleted documents | count | - | |
document_inserted_ps | Number of inserted documents | count | - | |||
document_returned_ps | Number of returned documents | count | - | |||
document_updated_ps | Number of updated documents | count | - | |||
GlobalLock | MongoDB_GlobalLocks | gl_ac_readers | Number of active client connections performing read operations | count | - | |
gl_ac_writers | Number of active client connections performing write operations | count | - | |||
gl_cq_writers | Number of operations queued for a write lock | count | - | |||
gl_cq_readers | Number of operations queued for a read lock | count | - | |||
gl_cq_total | Total number of operations queued for a lock | count | The sum of the number of operations queued for a write lock and the number of operations queued for a read lock. A large value indicates that client operations may be delayed, which can affect application response time. | |||
Number of scanned index entries and documents in queries | MongoDB_QueryExecutors | queryExecutor_scannedObject_ps | Number of documents scanned by queries | count | The total number of documents scanned during query execution and query plan evaluation. This is the same as | |
queryExecutor_scanned_ps | Number of index entries scanned by queries | count | The total number of index entries scanned during query execution and query plan evaluation. This is the same as | |||
TTL | MongoDB_TTLs | ttl_deletedDocuments_ps | Number of documents deleted due to TTL index | count | A large value indicates that many documents are being deleted, which may affect instance performance. For more information, see the documentation. | |
ttl_passes_ps | Number of times the background TTL thread performs deletions | count | The total number of times the TTL background process checks for expired documents. Each time it checks, the TTL monitor attempts to delete as many candidate documents as possible from all TTL indexes. | |||
Repl Opcounters | MongoDB_ReplOpcounters | repl_command | Number of Command operands in the replica set | count | During replication, MongoDB serializes operations, which may affect the count of each operation. Therefore, the values of the MongoDB_ReplOpcounters and MongoDB_Opcounters counters may differ. For more information, see Opcounters and Repl Opcounters metrics. | |
repl_delete | Number of Delete command operands in the replica set | count | ||||
repl_getmore | Number of Getmore command operands in the replica set | count | ||||
repl_insert | Number of Insert command operands in the replica set | count | ||||
repl_query | Number of Query command operands in the replica set | count | ||||
repl_update | Number of Update command operands in the replica set | count | ||||
Eviction scan count | MongoDB_WtCacheHPCheckEntriesWalked | wiredTiger_cache_hazardPointerCheckEntriesWalked | Number of items in the hazard pointer array scanned during eviction | count | Number of page evictions blocked by hazard pointers during eviction. | |
Lock Acquisitions | MongoDB_WtLockAcquisitions | wt_checkPoint_lock | Number of checkpoint lock acquisitions | count | - | |
wt_dhandle_read_lock | Number of data handle read lock acquisitions | count | If an instance has too many databases and collections, client requests may have to wait a long time for a handle lock. This affects instance performance. For more information, see Instance stuttering or abnormality caused by too many databases and collections. | |||
wt_dhandle_write_lock | Number of data handle write lock acquisitions | count | ||||
wt_metadata_lock | Number of metadata lock acquisitions | count | ||||
wt_schema_lock | Number of schema lock acquisitions | count | Frequent deletion and creation of databases, collections, or indexes, and having too many databases and collections can lead to higher schemaLock overhead, affecting instance performance. For more information, see Instance stuttering or abnormality caused by too many databases and collections. | |||
wt_table_read_lock | Number of table read lock acquisitions | count | - | |||
wt_table_write_lock | Number of table write lock acquisitions | count | - | |||
wt_txn_global_read_lock | Number of transaction global read lock acquisitions | count | - | |||
wt_txn_global_write_lock | Number of transaction global write lock acquisitions | count | - | |||
BPS usage rate | MongoDB_MbpsUsage | total_mbps_usage | Disk read/write bandwidth usage rate | % | The ratio of the instance's total disk throughput to the maximum BPS of the instance. This metric indicates the service load of the instance. If the BPS usage of a MongoDB instance reaches or approaches 100%, it can cause slow service responses or even service unavailability. For more information about cloud disk BPS, see Instance types. Note Only supported for cloud disk instances. |
|
Primary-secondary latency | MongoDB_Repl_Lag | repl_lag | Data synchronization latency between primary and secondary nodes | s |
|
|
Oplog retention period | MongoDB_OplogTimeInterval | oplog_time_interval | Oplog retention period | Hours | For versions 4.4 and later, modify the storage.oplogMinRetentionHours parameter on the instance product page. | |
moveChunk | MongoDB_MoveChunks | moveChunk_donor_started_ps | The number of times the current node acts as a migration source. | Count | This value increases regardless of whether the migration is successful. |
|
moveChunk_recip_stared_ps | The number of times the current node is the target for a chunk migration. | Count | ||||
Items per access | - | sl_qps | Accesses per second | Count | - |
|
Query executor information | MongoDB_QueryExecutors | collscans_nontailable | Number of full table scans for non-tailable cursors | Count | - |
|
collscans_total | Total number of full table scans | Item | - | |||
Number of databases and tables | MongoDB_CollectionNums | admin_user_coll | Number of user tables in the admin database | Count | - |
|
Number of assertions | MongoDB_Asserts | Regular | Normal level | Count | The number of assertions that passed. |
|
warning | Warning level | Count | The number of warning-level assertions. This value is always 0. | |||
msg | Message level | Count | The number of message-level assertions. | |||
user | User level | Item | The number of user-level assertions. | |||
Number of data handles | MongoDB_DataHandle | opened_fd_num | Active handle count | Item | The number of active connection data handles in the WiredTiger cache. |
|
closed_fd_num | Number of closed handles | Count | The number of closed data handles for connections scanned in the WiredTiger cache. | |||
opened_fd_mem | Memory used by active handles | MB | The memory used by currently active connection data handles in the WiredTiger cache. | |||
Operation latency | MongoDB_Latencies | reads_latency_ps | Latency of successful read requests | us | The latency of all successful read requests. |
|
writes_latency_ps | Successful write request latency | us | The latency of all successful write requests. The unit is us. | |||
commands_latency_ps | Latency of successful command operations | us | The latency of all successful requests for command operations, in us. | |||
trans_latency_ps | Latency of successful transaction requests | us | The time it takes for all successful requests in a transaction to be processed. The unit is us. | |||
TCMalloc memory fragmentation ratio | MongoDB_TcmallocCacheMemRatio | tcmalloc_cache_mem_ratio | TCMalloc memory fragmentation ratio | % | - |
|
Average write time for follows | MongoDB_GetLastErrorWtime | metrics_getLastError_avg_wtime | Average time for write follow operations | ms | The average time to perform a write-follow operation. |
|
metrics_getLastError_wtimeouts | Timeouts for write and follow operations | Times | Number of write concern operations that exceeded the `wtimeout` threshold. |
| ||
Replication buffer size | MongoDB_Repl_Buffer | repl_buffer_size | Current replication buffer size | MB | The current size of the replication buffer in the ReplicaSet. |
|
repl_buffer_max_size | Maximum replication buffer size | MB | The maximum size of the replication buffer in the ReplicaSet. | |||
WiredTiger cache page evictions | MongoDB_WtCacheEviction | pages_selected_count | Number of pages that are forcibly evicted | Count | - |
|
pages_selected_unable_to_evict_count | The number of pages that cannot be evicted. | Count | - | |||
hazard_pointer_blocked_page_eviction | Number of page evictions blocked by hazard pointers | Count | - | |||
max_page_size | The maximum page size encountered during the page eviction process. | MB | - | |||
pages_evicted_by_application_threads | Number of pages in the WiredTiger cache evicted by user threads | Item | - | |||
moveChunk | MongoDB_MoveChunks | moveChunk_deleter_task | Number of pending and running chunk range deletion tasks | Count | - | Sharded cluster |
LockAcquisitions | MongoDB_WtLockAcquisitions | wt_checkPoint_lock | Number of checkpoint lock acquisitions in the WiredTiger cache | Item | - |
|
wt_dhandle_read_lock | The number of read locks acquired for data handles in the WiredTiger cache. | Count | - | |||
wt_dhandle_write_lock | The number of times a write lock is acquired for a data handle in the WiredTiger cache. | Count | - | |||
wt_metadata_lock | The number of metadata locks acquired in the WiredTiger cache | Count | - | |||
wt_schema_lock | The number of schema locks acquired in the WiredTiger cache. | Count | - | |||
wt_table_read_lock | The number of table read locks acquired in the WiredTiger cache. | Count | - | |||
wt_table_write_lock | The number of table write locks acquired in the WiredTiger cache. | Count | - | |||
wt_txn_global_read_lock | The number of times the global read lock is acquired in the WiredTiger cache. | Count | - | |||
wt_txn_global_write_lock | The number of global write locks acquired in the WiredTiger cache. | Count | - | |||
Thread yielding | MongoDB_WtCache_Thread_Yield | page_acquire_eviction_blocked | Number of times blocked waiting for page eviction | Count | - |
|
page_acquire_locked_blocked | Number of waits for a locked target page | Times | - | |||
page_acquire_time_sleeping | Total thread sleep duration when fetching a page | us | - | |||
WiredTigerUsage | MongoDB_WTCacheUsage | wt_cache_updates_usage | WiredTiger update cache utilization | % | The proportion of the maximum cache size in bytes that is allocated for update operations. |
|
Classic multi-planner execution statistics | MongoDB_MultiPlanner_Worker | metrics_query_multiplanner_classicworks | Total number of tasks | Count | The total number of tasks executed by the classic multi-planner. |
|
Logical session cache information | MongoDB_LogicalSession | active_sessions_count | Number of logical sessions in the cache | Item | The total number of logical sessions in the cache since the last refresh. |
|
Node monitoring (formerly basic monitoring)
For information about the metrics supported by different instance types, see the console.
Metric | Key | Metric name | Metric meaning | Unit | Detailed description | Supported instance types |
Disk usage | DiskUsage | disk_usage | Disk usage | % | The percentage of the total disk capacity that is used by the instance. This metric indicates the disk load of the instance. If the disk usage exceeds 80%, change the instance configuration on the instance details page in the console or see Change instance configuration or High disk usage of ApsaraDB for MongoDB instances for solutions. |
|
Network traffic | MongoDB_Network | bytes_in | Inbound network traffic | Bytes | - | |
bytes_out | Outbound network traffic | Bytes | - | |||
num_requests | Number of processed requests | count | - | |||
Operation QPS | MongoDB_Opcounters | insert | Insert operations QPS | count | The MongoDB_Opcounters parameter includes all operations received by the instance, regardless of whether they were executed successfully. Batch operations of the Bulk.insert() type are recorded as a single operation. For more granular records, see the MongoDB_Documents metric. For more information, see Opcounters and Repl Opcounters metrics. | |
query | Query operations QPS | count | ||||
update | Update operations QPS | count | ||||
delete | Delete operations QPS | count | ||||
getmore | Read operations QPS | count | ||||
command | Protocol command operations QPS | count | ||||
Connections | MongoDB_TotalConns | connections_active | Current active connections | count | The number of client connections to the server that are performing operations. | |
current_conn | Current connections | count | The total number of client connections to the server. This includes connections established by other nodes in a replica set or connections established between Mongos and shard nodes. | |||
connections_totalCreated_ps | Total new connections per second | count | - |
| ||
connections_available | Current available connections | count | - | |||
Connection usage | ConnectionUsage | conn_usage | Connection usage | % |
| |
CPU usage | CpuUsage | cpu_usage | CPU usage | % | The sum of system CPU usage and user CPU usage. This metric indicates the service load of the instance. High CPU usage can cause slow data reads and writes, affecting normal services. For troubleshooting, see High CPU usage of ApsaraDB for MongoDB instances. | |
MongoDB_CpuDetail | cpu_sys | System CPU usage | % | - | ||
cpu_user | User CPU usage | % | - | |||
Memory usage | MemoryUsage | mem_usage | Memory usage | % | Memory is mainly occupied by the WiredTiger storage engine, client connections, and request processing. For information about the causes of high memory usage and optimization strategies, see High memory usage of ApsaraDB for MongoDB instances. | |
IOPS usage | MongoDB_IOPS | iops | IOPS usage | times/s |
| |
IOPS usage rate | IOPSUsage | iops_usage | IOPS usage rate | % | The ratio of the instance's IOPS usage to the maximum IOPS of the current instance type. This metric indicates the service load of the instance. If the IOPS usage of a MongoDB instance reaches or approaches 100%, it can cause slow service responses or even service unavailability. High IOPS usage of ApsaraDB for MongoDB instances describes how to view the IOPS usage rate and explains the causes of high IOPS usage and optimization strategies. Note Replica set and sharded cluster instances of ApsaraDB for MongoDB 4.2 that use cloud disks do not support viewing IOPS usage and IOPS usage rate. | |
Disk space usage | MongoDB_DetailedSpaceUsage | ins_size | Used disk space | Bytes |
| |
data_size | Used data disk space | Bytes | The space used by the data disk (excluding the local database). This mainly includes physical data files starting with "collection", physical index files starting with "index", and some physical metadata files, such as WiredTiger.wt. | |||
log_size | Used log disk space | Bytes | The physical size of the local database. | |||
Operation details | MongoDB_OperationDetails | operation_exactIDCount_ps | Number of count operations for a specific ID | count | The number of single update operations that use _id instead of a shard key on a sharded collection whose data is distributed across multiple shards. In current versions, this causes a traversal of all chunks in the instance. If the number of chunks is large, it may lead to full CPU utilization and affect instance performance. | |
operation_scanAndOrder_ps | Number of sort operations without an index | count | The number of sorted queries that cannot use an index to perform the sort operation. A large number can degrade instance performance. Based on your business query conditions, see Best practices for creating indexes in ApsaraDB for MongoDB for solutions. | |||
operation_writeConflicts_ps | Number of write conflicts | count | The number of queries that encountered write conflicts. A small number of write conflicts generally does not have a significant impact. However, many write conflicts can lead to decreased database performance. | |||
BPS | MongoDB_Disk_Detail | read_io_bandwidth_mbps | Disk read throughput | MB/s | - | |
write_io_bandwidth_mbps | Disk write throughput | MB/s | - | |||
io_bandwidth_mbps | Total disk throughput | MB/s | The sum of disk read throughput and disk write throughput. | |||
Transaction operands | MongoDB_Transactions | trans_totalPrepared_ps | Number of prepared transactions | count | - |
|
trans_totalPreparedThenCommited_ps | Number of prepared transactions that were successfully committed | count | - | |||
trans_totalPreparedThenAborted_ps | Number of prepared transactions that were successfully rolled back | count | - | |||
trans_totalStarted_ps | Number of started transactions | count | - |
| ||
trans_totalCommited_ps | Number of successfully committed transactions | count | - | |||
trans_totalAborted_ps | Number of successfully rolled back transactions | count | - | |||
Cursors | MongoDB_AllCursors | total_open | Number of currently open cursors | count | - | |
timed_out | Number of cursors closed due to timeout | count | If this value is large, check the client-side business code that processes data. | |||
job_cursors_closed | Number of cursors closed due to session closure | count | - | |||
pinned_open | Number of currently open and in-use cursors | count | For example, find or getMore operations pin a cursor to prevent it from being deleted while fetching the next batch of results, and unpin it after returning the results. | |||
noTimeout_open | Number of currently open and non-timed-out cursors | count | The number of open and non-timed-out cursors that use the noCursorTimeout option. This option prevents a cursor from timing out after a period of inactivity. However, the noCursorTimeout configuration is limited by the session timeout. For more information, see the documentation. |
| ||
WiredTiger | MongoDB_Wt_Cache | bytes_read_into_cache | Bytes read into cache | Bytes | The number of bytes of data read from disk into the WiredTiger cache. | |
bytes_written_from_cache | Bytes written from cache | Bytes | The number of bytes of data written from the WiredTiger cache to disk. | |||
maximum_bytes_configured | Maximum cache size | Bytes | The maximum number of bytes configured for the WiredTiger cache. For compatibility and security, ApsaraDB for MongoDB sets the CacheSize of the WiredTiger storage engine to about 60% of the requested instance memory size. For more information, see High memory usage of ApsaraDB for MongoDB instances. | |||
WT concurrent transactions | MongoDB_Wt_Concurrent_Trans | write_concurrent_trans_out | Current concurrent write transactions | count | Before V7.0, the limit for concurrent read and write transactions for an instance was 128. If the availability parameter was 0 for a long time, it could indicate an overload. Starting from V7.0, MongoDB uses a default algorithm to dynamically adjust the maximum number of concurrent storage engine transactions to optimize database throughput during overload. An availability parameter of 0 for a long time does not necessarily indicate an overload. For more information, see the documentation. | |
write_concurrent_trans_available | Available concurrent write transactions | count | ||||
read_concurrent_trans_out | Current concurrent read transactions | count | ||||
read_concurrent_trans_available | Available concurrent read transactions | count | ||||
WiredTigerUsage | MongoDB_WTCacheUsage | wt_cache_dirty_usage | WiredTiger dirty cache usage | % | For more information, see High memory usage of ApsaraDB for MongoDB instances. | |
wt_cache_usage | WiredTiger cache usage | % | ||||
Average response time | MongoDB_RT | avg_rt | Total average response time | μs | - | |
reads_avg_rt | Average response time for read operations | μs | - | |||
writes_avg_rt | Average response time for write operations | μs | - | |||
commands_avg_rt | Average response time for command operations | μs | - | |||
trans_avg_rt | Average response time for transaction operations | μs | - | |||
Number of affected documents | MongoDB_Documents | document_deleted_ps | Number of deleted documents | count | - | |
document_inserted_ps | Number of inserted documents | count | - | |||
document_returned_ps | Number of returned documents | count | - | |||
document_updated_ps | Number of updated documents | count | - | |||
GlobalLock | MongoDB_GlobalLocks | gl_ac_readers | Number of active client connections performing read operations | count | - | |
gl_ac_writers | Number of active client connections performing write operations | count | - | |||
gl_cq_writers | Number of operations queued for a write lock | count | - | |||
gl_cq_readers | Number of operations queued for a read lock | count | - | |||
gl_cq_total | Total number of operations queued for a lock | count | The sum of the number of operations queued for a write lock and the number of operations queued for a read lock. A large value indicates that client operations may be delayed, which can affect application response time. | |||
Number of scanned index entries and documents in queries | MongoDB_QueryExecutors | queryExecutor_scannedObject_ps | Number of documents scanned by queries | count | The total number of documents scanned during query execution and query plan evaluation. This is the same as | |
queryExecutor_scanned_ps | Number of index entries scanned by queries | count | The total number of index entries scanned during query execution and query plan evaluation. This is the same as | |||
TTL | MongoDB_TTLs | ttl_deletedDocuments_ps | Number of documents deleted due to TTL index | count | A large value indicates that many documents are being deleted, which may affect instance performance. For more information, see the documentation. | |
ttl_passes_ps | Number of times the background TTL thread performs deletions | count | The total number of times the TTL background process checks for expired documents. Each time it checks, the TTL monitor attempts to delete as many candidate documents as possible from all TTL indexes. | |||
Repl Opcounters | MongoDB_ReplOpcounters | repl_command | Number of Command operands in the replica set | count | During replication, MongoDB serializes operations, which may affect the count of each operation. Therefore, the values of the MongoDB_ReplOpcounters and MongoDB_Opcounters counters may differ. For more information, see Opcounters and Repl Opcounters metrics. | |
repl_delete | Number of Delete command operands in the replica set | count | ||||
repl_getmore | Number of Getmore command operands in the replica set | count | ||||
repl_insert | Number of Insert command operands in the replica set | count | ||||
repl_query | Number of Query command operands in the replica set | count | ||||
repl_update | Number of Update command operands in the replica set | count | ||||
Eviction scan count | MongoDB_WtCacheHPCheckEntriesWalked | wiredTiger_cache_hazardPointerCheckEntriesWalked | Number of items in the hazard pointer array scanned during eviction | count | Number of page evictions blocked by hazard pointers during eviction. | |
Lock Acquisitions | MongoDB_WtLockAcquisitions | wt_checkPoint_lock | Number of checkpoint lock acquisitions | count | - | |
wt_dhandle_read_lock | Number of data handle read lock acquisitions | count | If an instance has too many databases and collections, client requests may have to wait a long time for a handle lock. This affects instance performance. For more information, see Instance stuttering or abnormality caused by too many databases and collections. | |||
wt_dhandle_write_lock | Number of data handle write lock acquisitions | count | ||||
wt_metadata_lock | Number of metadata lock acquisitions | count | ||||
wt_schema_lock | Number of schema lock acquisitions | count | Frequent deletion and creation of databases, collections, or indexes, and having too many databases and collections can lead to higher schemaLock overhead, affecting instance performance. For more information, see Instance stuttering or abnormality caused by too many databases and collections. | |||
wt_table_read_lock | Number of table read lock acquisitions | count | - | |||
wt_table_write_lock | Number of table write lock acquisitions | count | - | |||
wt_txn_global_read_lock | Number of transaction global read lock acquisitions | count | - | |||
wt_txn_global_write_lock | Number of transaction global write lock acquisitions | count | - | |||
BPS usage rate | MongoDB_MbpsUsage | total_mbps_usage | Disk read/write bandwidth usage rate | % | The ratio of the instance's total disk throughput to the maximum BPS of the instance. This metric indicates the service load of the instance. If the BPS usage of a MongoDB instance reaches or approaches 100%, it can cause slow service responses or even service unavailability. For more information about cloud disk BPS, see Instance types. Note Only supported for cloud disk instances. |
|
Primary-secondary latency | MongoDB_Repl_Lag | repl_lag | Data synchronization latency between primary and secondary nodes | s |
|
|
Oplog retention period | MongoDB_OplogTimeInterval | oplog_time_interval | Oplog retention period | Hours | For versions 4.4 and later, modify the storage.oplogMinRetentionHours parameter on the instance product page. | |
moveChunk | MongoDB_MoveChunks | moveChunk_donor_started_ps | The number of times the current node acts as a migration source. | Count | This value increases regardless of whether the migration is successful. |
|
moveChunk_recip_stared_ps | The number of times the current node is the target for a chunk migration. | Count | ||||
Items per access | - | sl_qps | Accesses per second | Count | - |
|
Query executor information | MongoDB_QueryExecutors | collscans_nontailable | Number of full table scans for non-tailable cursors | Count | - |
|
collscans_total | Total number of full table scans | Item | - | |||
Number of databases and tables | MongoDB_CollectionNums | admin_user_coll | Number of user tables in the admin database | Count | - |
|
Number of assertions | MongoDB_Asserts | Regular | Normal level | Count | The number of assertions that passed. |
|
warning | Warning level | Count | The number of warning-level assertions. This value is always 0. | |||
msg | Message level | Count | The number of message-level assertions. | |||
user | User level | Item | The number of user-level assertions. | |||
Number of data handles | MongoDB_DataHandle | opened_fd_num | Active handle count | Item | The number of active connection data handles in the WiredTiger cache. |
|
closed_fd_num | Number of closed handles | Count | The number of closed data handles for connections scanned in the WiredTiger cache. | |||
opened_fd_mem | Memory used by active handles | MB | The memory used by currently active connection data handles in the WiredTiger cache. | |||
Operation latency | MongoDB_Latencies | reads_latency_ps | Latency of successful read requests | us | The latency of all successful read requests. |
|
writes_latency_ps | Successful write request latency | us | The latency of all successful write requests. The unit is us. | |||
commands_latency_ps | Latency of successful command operations | us | The latency of all successful requests for command operations, in us. | |||
trans_latency_ps | Latency of successful transaction requests | us | The time it takes for all successful requests in a transaction to be processed. The unit is us. | |||
TCMalloc memory fragmentation ratio | MongoDB_TcmallocCacheMemRatio | tcmalloc_cache_mem_ratio | TCMalloc memory fragmentation ratio | % | - |
|
Average write time for follows | MongoDB_GetLastErrorWtime | metrics_getLastError_avg_wtime | Average time for write follow operations | ms | The average time to perform a write-follow operation. |
|
metrics_getLastError_wtimeouts | Timeouts for write and follow operations | Times | Number of write concern operations that exceeded the `wtimeout` threshold. |
| ||
Replication buffer size | MongoDB_Repl_Buffer | repl_buffer_size | Current replication buffer size | MB | The current size of the replication buffer in the ReplicaSet. |
|
repl_buffer_max_size | Maximum replication buffer size | MB | The maximum size of the replication buffer in the ReplicaSet. | |||
WiredTiger cache page evictions | MongoDB_WtCacheEviction | pages_selected_count | Number of pages that are forcibly evicted | Count | - |
|
pages_selected_unable_to_evict_count | The number of pages that cannot be evicted. | Count | - | |||
hazard_pointer_blocked_page_eviction | Number of page evictions blocked by hazard pointers | Count | - | |||
max_page_size | The maximum page size encountered during the page eviction process. | MB | - | |||
pages_evicted_by_application_threads | Number of pages in the WiredTiger cache evicted by user threads | Item | - | |||
moveChunk | MongoDB_MoveChunks | moveChunk_deleter_task | Number of pending and running chunk range deletion tasks | Count | - | Sharded cluster |
LockAcquisitions | MongoDB_WtLockAcquisitions | wt_checkPoint_lock | Number of checkpoint lock acquisitions in the WiredTiger cache | Item | - |
|
wt_dhandle_read_lock | The number of read locks acquired for data handles in the WiredTiger cache. | Count | - | |||
wt_dhandle_write_lock | The number of times a write lock is acquired for a data handle in the WiredTiger cache. | Count | - | |||
wt_metadata_lock | The number of metadata locks acquired in the WiredTiger cache | Count | - | |||
wt_schema_lock | The number of schema locks acquired in the WiredTiger cache. | Count | - | |||
wt_table_read_lock | The number of table read locks acquired in the WiredTiger cache. | Count | - | |||
wt_table_write_lock | The number of table write locks acquired in the WiredTiger cache. | Count | - | |||
wt_txn_global_read_lock | The number of times the global read lock is acquired in the WiredTiger cache. | Count | - | |||
wt_txn_global_write_lock | The number of global write locks acquired in the WiredTiger cache. | Count | - | |||
Thread yielding | MongoDB_WtCache_Thread_Yield | page_acquire_eviction_blocked | Number of times blocked waiting for page eviction | Count | - |
|
page_acquire_locked_blocked | Number of waits for a locked target page | Times | - | |||
page_acquire_time_sleeping | Total thread sleep duration when fetching a page | us | - | |||
WiredTigerUsage | MongoDB_WTCacheUsage | wt_cache_updates_usage | WiredTiger update cache utilization | % | The proportion of the maximum cache size in bytes that is allocated for update operations. |
|
Classic multi-planner execution statistics | MongoDB_MultiPlanner_Worker | metrics_query_multiplanner_classicworks | Total number of tasks | Count | The total number of tasks executed by the classic multi-planner. |
|
Logical session cache information | MongoDB_LogicalSession | active_sessions_count | Number of logical sessions in the cache | Item | The total number of logical sessions in the cache since the last refresh. |
|
Advanced monitoring
Only standalone, replica set, and sharded cluster instances support Advanced Monitoring.
For information about the specific metrics supported by your instance type, see the console.
Supported instances | Metric | Metric and description | Description | Unit |
| CPU usage | cpu_usage | The CPU usage of the instance. | % |
Memory usage | mem_usage | The memory usage of the instance. | % | |
Disk space usage | ins_size | Total space used. | Bytes | |
data_size | Data disk space used. | Bytes | ||
log_size | Log disk space used. | Bytes | ||
Connection usage | conn_usage | The ratio of the current number of connections to the maximum number of connections. | % | |
Cursors | open_no_timedout | The number of open cursors that do not have a timeout. | Unit | |
pinned_open | The number of cursors that are currently in use. | Unit | ||
open_total | The total number of open cursors. | Item | ||
closed_by_timeout | The number of cursors closed due to a timeout. | Unit | ||
closed_by_session | The number of cursors closed because a session was closed. | Unit | ||
Read/write queues | currentQueue_total | The total number of operations waiting for a lock. | Unit | |
currentQueue_readers | The number of operations waiting for a read lock. | Unit | ||
currentQueue_writers | The number of operations waiting for a write lock. | Count | ||
active_readers | The number of active client connections performing read operations. | Item | ||
active_writers | The number of active client connections performing write operations. | Item | ||
Average response time (MongoDB_RT) | avg_RT | The average response time of the instance. | microseconds | |
reads_avg_rt | The average response time for read operations. | microseconds | ||
writes_avg_rt | The average response time for write operations. | microseconds | ||
commands_avg_rt | The average response time for command operations. | microseconds | ||
trans_avg_rt | The average response time for transaction operations. | microseconds | ||
WiredTiger request queues | write_concurrent_trans_out | The number of concurrent write requests. | Count | |
read_concurrent_trans_out | The number of concurrent read requests. | Unit | ||
write_concurrent_trans_available | The number of available concurrent write requests. | Unit | ||
read_concurrent_trans_available | The number of available concurrent read requests. | Unit | ||
I/O latency | iocheck_cost | The response performance of the current I/O. Note Supported only for standalone instances and replica set instances that run MongoDB 4.0 or earlier. | ms | |
WiredTiger cache usage | wt_cache_usage | The WiredTiger cache usage. | % | |
wt_cache_dirty_usage | The WiredTiger dirty cache usage. | % | ||
Number of documents affected | deletedDocuments | The number of documents deleted. | Unit | |
insertedDocuments | The number of documents inserted. | Unit | ||
returnDocuments | The number of documents returned. | Count | ||
updatedDocuments | The number of documents updated. | Item | ||
Operation details | scanAndOrder | The number of requests that cannot use an index for sorting. | Item | |
writeConflicts | The number of write conflicts. | Unit | ||
exactIDCount | The number of requests that need to obtain matching _id information by broadcasting. | Count | ||
Number of indexes and documents scanned in queries | scannedKeys | The number of index keys scanned in queries. | Count | |
scannedDocs | The number of documents scanned in queries. | Unit | ||
TTL | ttlDeletedDocuments | The number of documents deleted due to a TTL index. | Item | |
ttlPasses | The number of times the background TTL thread performed deletions. | Item | ||
Lock acquisitions | wiredTiger_schema_lock_delta | The number of times a schema lock was acquired. | Item | |
wiredTiger_metadata_lock_delta | The number of times a metadata lock was acquired. | Units | ||
wiredTiger_table_read_lock_delta | The number of times a table read lock was acquired. | Unit | ||
wiredTiger_table_write_lock_delta | The number of times a table write lock was acquired. | Item | ||
wiredTiger_txn_global_read_lock_delta | The number of times a global read lock for transactions was acquired. | Unit | ||
wiredTiger_txn_global_write_lock_delta | The number of times a global write lock for transactions was acquired. | Unit | ||
MBPS | read_io_bandwidth_mbps | The disk read throughput. | MB/s | |
write_io_bandwidth_mbps | The disk write throughput. | MB/s | ||
io_bandwidth_mbps | The total disk throughput. | MB/s | ||
Number of transaction operations | trans_totalPrepared_ps | The number of prepared transactions. | Unit | |
trans_totalPreparedThenCommited_ps | The number of prepared transactions that were successfully committed. | Count | ||
trans_totalPreparedThenAborted_ps | The number of prepared transactions that were successfully rolled back. | Unit | ||
trans_totalStarted_ps | The number of started transactions. | Item | ||
trans_totalCommited_ps | The number of successfully committed transactions. | Unit | ||
trans_totalAborted_ps | The number of successfully rolled back transactions. | Unit | ||
MBPS usage | total_mbps_usage | The disk read/write bandwidth usage. Note
| % | |
WiredTiger | bytes_read_into_cache | The amount of data read into the cache. | Bytes | |
bytes_written_from_cache | The amount of data written to the disk from the cache. | Bytes | ||
maximum_bytes_configured | The maximum configured disk size. | Bytes | ||
Disk space usage | disk_usage | The ratio of the total space used to the maximum available space. | % | |
Operation QPS | insert | You can insert an operand. | Unit | |
query | The number of query operations. | Unit | ||
update | The number of update operations. | Count | ||
delete | The number of delete operations. | Item | ||
getmore | The number of read operations. | Count | ||
command | The number of protocol command operations. | Count | ||
Connections | current_conn | The total number of current connections to the instance. | Item | |
active_conn | The number of active connections to the instance. | Unit | ||
Network traffic | bytes_in | Inbound traffic. | Bytes | |
bytes_out | Outbound traffic. | Bytes | ||
| IOPS usage | data_iops(iops) | IOPS usage. Note
| counts/s |
IOPS usage rate | iops_usage | The ratio of the IOPS used by the instance to the maximum available IOPS. Note Instances that use disks and run MongoDB 4.2 do not support viewing IOPS usage and IOPS usage rate. | % | |
Primary-secondary latency | repl_lag | The data synchronization latency between the primary and secondary nodes of the instance. Note
| s | |
Sharded cluster instances | Total operation QPS for the shard component of a sharded cluster | insert_primary | The number of insert operations on the primary node. | Unit |
query_primary | The number of query operations on the primary node. | Item | ||
update_primary | The number of update operations on the primary node. | Count | ||
delete_primary | The number of delete operations on the primary node. | Unit | ||
getmore_primary | The number of read operations on the primary node. | Unit | ||
command_primary | The number of protocol command operations on the primary node. | Unit | ||
insert_secondary | The number of insert operations on secondary nodes. | Item | ||
query_secondary | The number of query operations on secondary nodes. | Item | ||
insert_hidden | The number of insert operations on hidden nodes. | Count | ||
query_hidden | The number of query operations on hidden nodes. | Unit | ||
update_hidden | The number of update operations on hidden nodes. | Item | ||
delete_hidden | The number of delete operations on hidden nodes. | Unit | ||
getmore_hidden | The number of read operations on hidden nodes. | Unit | ||
command_hidden | The number of protocol command operations on hidden nodes. | Count | ||
Total operation QPS for the Mongos component of a sharded cluster | insert | You can insert an operand. | Unit | |
query | The number of query operations. | Count | ||
update | The number of update operations. | Item | ||
delete | The number of delete operations. | Count | ||
getmore | The number of read operations. | Item | ||
command | The number of protocol command operations. | Unit | ||
moveChunk | donorCount | The number of times the current node acted as the source for a moveChunk or moveRange operation. | Unit | |
recipientCount | The number of times the current node acted as the destination shard to receive chunks. | Unit |
Performance Trend
For information about the metrics supported by each instance type, see the console.
Supported instances | Metric | Metric and description |
| CPU usage | mongodb.cpu_usage: The CPU usage of the instance. |
Memory usage | mongodb.mem_usage: The memory usage of the instance. | |
Disk space usage | The performance trend of disk space usage for the instance. This includes:
| |
Cursors | The performance trend of the number of cursors for the instance. This includes:
| |
WiredTiger request queue | The performance trend of the number of read/write requests and the number of available concurrent operations. This includes:
Note This metric is supported only for Standard Edition replica set instances. | |
WiredTiger | The performance trend of metrics for the cache layer of the instance's WiredTiger engine. This includes:
Note This metric is supported only for Standard Edition replica set instances. | |
| Disk usage | mongodb.disk_usage: The disk usage of MongoDB. |
Operation QPS | The performance trend of operations per second (QPS) for the instance. This includes:
| |
Connections | mongodb.connections.current: The total number of current connections to the instance. | |
Network traffic | The performance trend of network traffic for the instance. This includes:
| |
| IOPS usage | The performance trend of input/output operations per second (IOPS) usage. This includes:
|
IOPS usage rate | mongodb.iops_usage: The IOPS usage rate. Note IOPS usage and IOPS usage rate are not supported for version 4.2 replica set instances and sharded cluster instances that use cloud disks. | |
Replica set instance | GlobalLock | The performance trend of the global lock for the instance. This includes:
|