All Products
Search
Document Center

ApsaraDB for MongoDB:Monitoring items and metrics

Last Updated:Oct 31, 2024

This topic describes the monitoring items and metrics supported by the basic monitoring, advanced monitoring, and performance trends features of ApsaraDB for MongoDB.

Basic monitoring

Note

The monitoring items vary based on the instance architecture. The monitoring items displayed in the ApsaraDB for MongoDB console shall prevail.

Monitoring item

key

Metric name

Description

Supported instance architecture

Disk usage

DiskUsage

disk_usage

The disk usage of the instance.

  • Standalone instance

  • Replica set instance

  • Sharded cluster instance

  • Serverless RDS instances

Network traffic

MongoDB_Network

bytes_in

The inbound network traffic of the instance.

bytes_out

The outbound network traffic of the instance.

num_requests

The number of requests allocated to the instance.

QPS

MongoDB_Opcounters

insert

The number of insert operations performed on the instance per second.

query

The number of query operations performed on the instance per second.

update

The number of update operations performed on the instance per second.

delete

The number of delete operations performed on the instance per second.

getmore

The number of read operations performed on the instance per second.

command

The number of command operations performed on the instance per second.

Connections

MongoDB_TotalConns

connections_active

The number of active connections to the instance

current_conn

The total number of connections to the instance.

connections_totalCreated_ps

The number of new connections to the instance per second.

  • Standalone instance

  • Replica set instance

  • Sharded cluster instance

connections_available

The number of available connections to the instance.

Connection utilization

ConnectionUsage

conn_usage

The connection utilization of the instance.

CPU utilization

CpuUsage

cpu_usage

The CPU utilization of the instance.

Memory usage

MemoryUsage

mem_usage

The memory usage of the instance.

IOPS usage

MongoDB_IOPS

data_iops(iops)

The IOPS usage of the instance.

Note
  • The IOPS usage and IOPS utilization of a replica set or sharded cluster instance that runs MongoDB 4.2 and uses cloud disks cannot be queried.

  • The data_iops and log_iops metrics in the previous version of the monitoring system are merged into the data_iops(iops) metric in the new version of the system.

IOPS utilization

IOPSUsage

iops_usage

The IOPS utilization of the instance.

Note

The IOPS usage and IOPS utilization of a replica set or sharded cluster instance that runs MongoDB 4.2 and uses cloud disks cannot be queried.

Used disk space

MongoDB_DetailedSpaceUsage

ins_size

The total disk space occupied by the instance.

data_size

The disk space occupied by data.

log_size

The disk space occupied by logs.

Operation details

MongoDB_OperationDetails

operation_exactIDCount_ps

The number of count operations for an ID.

operation_scanAndOrder_ps

The number of scan and sort operations.

operation_writeConflicts_ps

The number of write conflicts.

MBPS

MongoDB_Disk_Detail

read_io_bandwidth_mbps

The throughput of disk read operations.

write_io_bandwidth_mbps

The throughput of disk write operations.

io_bandwidth_mbps

The total disk throughput.

Cursors

MongoDB_AllCursors

total_open

The number of open cursors in the instance.

timed_out

The number of cursors that are disabled due to timeout in the instance.

job_cursors_closed

The number of cursors that are disabled due to terminated sessions in the instance.

pinned_open

The number of open cursors that time out in the instance.

noTimeout_open

The number of open cursors that do not time out in the instance.

  • Standalone instance

  • Replica set instance

  • Sharded cluster instance (valid only for shard and ConfigServer nodes in a sharded cluster instance)

WiredTiger

MongoDB_Wt_Cache

bytes_read_into_cache

The number of bytes written to the cache.

bytes_written_from_cache

The number of bytes read from the cache.

maximum_bytes_configured

The maximum available disk capacity allocated to the WiredTiger cache.

WiredTiger request queues

MongoDB_Wt_Concurrent_Trans

write_concurrent_trans_out

The number of concurrent write transactions.

write_concurrent_trans_available

The number of concurrent write transactions available in a WiredTiger request queue.

read_concurrent_trans_out

The number of concurrent read transactions.

read_concurrent_trans_available

The number of concurrent read transactions available in a WiredTiger request queue.

WiredTigerUsage

MongoDB_WTCacheUsage

wt_cache_dirty_usage

The utilization of the dirty cache in WiredTiger.

wt_cache_usage

The utilization of the cache in WiredTiger.

Average response time

MongoDB_RT

avg_rt

The average response time of the instance.

reads_avg_rt

The average response time of a read operation.

writes_avg_rt

The average response time of a write operation.

commands_avg_rt

The average response time of a command operation.

trans_avg_rt

The average response time of a transaction operation.

Number of affected documents

MongoDB_Documents

document_deleted_ps

The number of deleted documents for the instance.

document_inserted_ps

The number of inserted documents for the instance.

document_returned_ps

The number of returned documents for the instance.

document_updated_ps

The number of updated documents for the instance.

Read and write queue length

MongoDB_GlobalLocks

gl_ac_readers

The number of globally active read locks.

gl_ac_writers

The current number of globally active write locks.

gl_cq_writers

The number of globally concurrent write requests.

gl_cq_readers

The number of globally concurrent read requests.

gl_cq_total

The total number of globally concurrent requests.

Number of indexes and documents that are queried and scanned

MongoDB_QueryExecutors

queryExecutor_scannedObject_ps

The number of documents that are queried and scanned.

queryExecutor_scanned_ps

The number of indexes that are queried and scanned.

TTL

MongoDB_TTLs

ttl_deletedDocuments_ps

The number of documents that are deleted due to time-to-Live (TTL) indexes.

ttl_passes_ps

The number of delete operations that the background TTL threads perform.

Repl Opcounters

MongoDB_ReplOpcounters

repl_command

The number of operations performed to replicate the Command command.

repl_delete

The number of operations performed to replicate the Delete command.

repl_getmore

The number of operations performed to replicate the Getmore command.

repl_insert

The number of operations performed to replicate the Insert command.

repl_query

The number of operations performed to replicate the Query command.

repl_update

The number of operations performed to replicate the Update command.

The number of scan operations during eviction.

MongoDB_WtCacheHPCheckEntriesWalked

wiredTiger_cache_hazardPointerCheckEntriesWalked

The number of entries scanned for a hazard pointer array.

Lock Acquisitions

MongoDB_WtLockAcquisitions

wt_checkPoint_lock

The number of obtained checkpoint locks.

wt_dhandle_read_lock

The number of obtained data handle read locks.

wt_dhandle_write_lock

The number of obtained data handle write locks.

wt_metadata_lock

The number of obtained metadata locks.

wt_schema_lock

The number of obtained mode locks.

wt_table_read_lock

The number of obtained collection-level read locks.

wt_table_write_lock

The number of obtained collection-level write locks.

wt_txn_global_read_lock

The number of obtained transaction-level global read locks.

wt_txn_global_write_lock

The number of obtained transaction-level global write locks.

Primary/secondary latency

MongoDB_Repl_Lag

repl_lag

The latency in data synchronization between the primary and secondary nodes of the instance.

Note
  • The heartbeat interval between two nodes in a replica set instance is 2 seconds. Therefore, the repl_lag value of a node in a replica set instance or a shard node or a ConfigServer node in a sharded cluster instance can range from -2 to 2.

  • The repl_lag value of a secondary node in a replica set instance may be a negative value. This does not mean that the secondary node leads the primary node in the instance in the terms of data updates. To obtain the latest status of the primary/secondary latency in a replica set instance, run the rs.printSecondaryReplicationInfo() command on the primary node in the instance.

  • Replica set instance

  • Sharded cluster instance (valid only for shard and ConfigServer nodes in a sharded cluster instance)

Retention period of binary logs

MongoDB_OplogTimeInterval

oplog_time_interval

The retention period of binary logs.

moveChunk

MongoDB_MoveChunks

moveChunk_donor_started_ps

The number of times that the current node is used as the moveChunk source shard.

  • Sharded cluster instance (valid only for shard and mongos nodes in a sharded cluster instance)

moveChunk_recip_stared_ps

The number of times that the current node is used as the moveChunk destination shard.

Number of requests

-

sl_qps

The number of requests per second.

  • Serverless RDS instances

Advanced monitoring

Note
  • The advanced monitoring feature is supported only by standalone, replica set, and sharded cluster instances.

  • The monitoring items vary based on the instance architecture. The monitoring items displayed in the ApsaraDB for MongoDB console shall prevail.

Instance architecture

Monitoring item

Metric and description

  • Standalone instance

  • Replica set instance

  • Sharded cluster instance

CPU utilization

cpu_usage: the CPU utilization of the instance.

Memory usage

mem_usage: the memory usage of the instance.

Used disk space

The total disk space occupied by the instance. Related metrics:

  • ins_size: the total disk space occupied by the instance.

  • data_size: the disk space occupied by data files.

  • log_size: the disk space occupied by log files.

Connection utilization

conn_usage: the proportion of the current connections to the maximum connections.

cursors

The number of cursors used by the instance. Related metrics:

  • open_no_timedout: the number of open cursors that have timeout disabled.

  • open_with_timedout: the number of open cursors that have timeout enabled.

  • open_total: the number of open cursors.

  • closed_by_timeout: the number of cursors that are closed due to timeout.

  • closed_by_session: the number of cursors that are closed due to terminated sessions.

Read and write queue length

The total number of operations queued waiting for a global lock. Related metrics:

  • currentQueue_total: the number of operations queued waiting for a global read and write lock.

  • currentQueue_readers: the number of operations queued waiting for a global read lock.

  • currentQueue_writers: the number of operations queued waiting for a global write lock.

  • active_readers: the number of operations that trigger a global read lock.

  • active_writers: the number of operations that trigger a global write lock.

Average response time

avgRT: the average response time of the instance.

Number of WiredTiger transactions

The number of and the available number of concurrent read and write transactions allowed into the WiredTiger engine. Related metrics:

  • write_concurrent_trans_out: the number of concurrent write transactions allowed into the WiredTiger engine.

  • read_concurrent_trans_out: the number of concurrent read transactions allowed into the WiredTiger engine.

  • write_concurrent_trans_available: the available number of concurrent write transactions allowed into the WiredTiger engine.

  • read_concurrent_trans_available: the available number of concurrent read transactions allowed into the WiredTiger engine.

I/O latency

iocheck_cost: indicates how fast the current I/O system responds.

Note

This metric is supported only for standalone instances and replica set instances that run MongoDB 4.0 or earlier.

WiredTiger cache usage

The cache usage of the WiredTiger engine for the instance. Related metrics:

  • wt_cache_usage: the cache usage of the WiredTiger engine for the instance.

  • wt_cache_dirty_usage: the dirty cache usage of the WiredTiger engine.

Number of affected documents

The number of documents of the instance. Related metrics:

  • deletedDocuments: the number of documents that are deleted.

  • insertedDocuments: the number of documents that are inserted.

  • returnDocuments: the number of documents that are returned.

  • updatedDocuments: the number of documents that are updated.

Operation details

The details of the operations performed on the instance. Related metrics:

  • scanAndOrder: the number of requests that cannot be sorted by index.

  • writeConflicts: the number of write conflicts that occur.

  • exactIDCount: the number of requests that are sent to query matched IDs by using broadcast.

Number of indexes and documents that are queried and scanned

The number of indexes and documents that are queried and scanned. Related metrics:

  • scannedKeys: the number of indexes that are queried and scanned.

  • scannedDocs: the number of documents that are queried and scanned.

TTL

The TTL operation performed on the instance. Related metrics:

  • ttlDeletedDocuments: the number of documents that are deleted due to TTL indexes.

  • ttlPasses: the number of times that the TTL thread deletes expired documents in the background.

  • Standalone instance

  • Replica set instance

  • Sharded cluster instance

  • Serverless RDS instances

Disk usage

disk_usage: the proportion of the total disk space occupied by the instance to the maximum disk space available.

Note

The metric is not supported for serverless instances.

QPS

The queries per second (QPS) of the instance. Related metrics:

  • insert: the number of insert operations.

  • query: the number of query operations.

  • update: the number of update operations.

  • delete: the number of delete operations.

  • getmore: the number of read operations.

  • command: the number of command operations.

Note

The metric is not supported for serverless instances.

Connections

The number of connections to the instance. Related metrics:

  • current_conn: the total number of connections to the instance.

  • active_conn: the number of active connections to the instance.

Note

The metric is not supported for serverless instances.

Network traffic

The network traffic of the instance. Related metrics:

  • bytes_in: the inbound network traffic.

  • bytes_out: the outbound network traffic.

Note

The metric is not supported for serverless instances.

  • Replica set instance

  • Sharded cluster instance

IOPS usage

data_iops(iops): the IOPS usage of the instance.

Note
  • The IOPS usage and IOPS utilization of a replica set or sharded cluster instance that runs MongoDB 4.2 and uses cloud disks cannot be queried.

  • The data_iops and log_iops metrics in the previous version of the monitoring system are merged into the data_iops(iops) metric in the new version of the system.

IOPS utilization

iops_usage: the proportion of the IOPS used by the instance to the maximum available IOPS.

Note

The IOPS usage and IOPS utilization of a replica set or sharded cluster instance that runs MongoDB 4.2 and uses cloud disks cannot be queried.

Primary/secondary latency

repl_lag: the latency in data synchronization between the primary and secondary nodes of the instance.

Note
  • The heartbeat interval between the primary and secondary nodes in a replica set instance is 2 seconds. Therefore, the repl_lag value of a replica set or sharded cluster instance can range from -2 to 2.

  • The repl_lag value of a secondary node in a replica set instance may be a negative value. This does not mean that the secondary node leads the primary node in the instance in the terms of data updates. To obtain the latest status of the primary/secondary latency in a replica set instance, run the rs.printSecondaryReplicationInfo() command on the primary node in the instance.

Sharded cluster instance

Total QPS of shard nodes in a sharded cluster instance

Total QPS of shard nodes in the instance. Related metrics:

  • insert_primary: the number of insert operations performed on the primary node.

  • query_primary: the number of query operations performed on the primary node.

  • update_primary: the number of update operations performed on the primary node.

  • delete_primary: the number of delete operations performed on the primary node.

  • getmore_primary: the number of read operations performed on the primary node.

  • command_primary: the number of command operations performed on the primary node.

  • insert_secondary: the number of insert operations performed on the secondary node.

  • query_secondary: the number of query operations performed on the secondary node.

  • insert_hidden: the number of insert operations performed on the hidden node.

  • query_hidden: the number of query operations performed on the hidden node.

  • update_hidden: the number of update operations performed on the hidden node.

  • delete_hidden: the number of delete operations performed on the hidden node.

  • getmore_hidden: the number of read operations performed on the hidden node.

  • command_hidden: the number of command operations performed on the hidden node.

Total QPS of mongos nodes in a sharded cluster instance

Total QPS of mongos nodes in the instance. Related metrics:

  • insert: the number of insert operations.

  • query: the number of query operations.

  • update: the number of update operations.

  • delete: the number of delete operations.

  • getmore: the number of read operations.

  • command: the number of command operations.

moveChunk

The number of moveChunk operations performed on the current node that serves as the source or destination node. Related metrics:

  • donorCount: the number of moveChunk operations performed on the current node that serves as the source node.

  • recipientCount: the number of moveChunk operations performed on the current node that serves as the destination node.

Performance trends

Note

The monitoring items vary based on the instance architecture. The monitoring items displayed in the ApsaraDB for MongoDB console shall prevail.

Instance architecture

Monitoring item

Metric and description

  • Standalone instance

  • Replica set instance

  • Sharded cluster instance

CPU utilization

mongodb.cpu_usage: the CPU utilization of the instance.

Memory usage

mongodb.mem_usage: the memory usage of the instance.

Used disk space

The performance trends of the disk space used by the instance. Related metrics:

  • mongodb.detailed_space_usage.ins_size: the total disk space used by the instance.

  • mongodb.detailed_space_usage.data_size: the disk space used by data files.

  • mongodb.detailed_space_usage.log_size: the disk space used by log files.

cursors

The performance trends of cursors of the instance. Related metrics:

  • mongodb.metrics.cursor.timedOut: the number of cursors that timed out.

  • mongodb.metrics.cursor.open.total: the number of open cursors.

Number of WiredTiger transactions

The performance trends of read and write requests and available concurrent requests. Related metrics:

  • mongodb.wiredTiger.write_concurrent_trans_out: the number of concurrent write transactions in a WiredTiger request queue.

  • mongodb.wiredTiger.read_concurrent_trans_out: the number of concurrent read transactions in a WiredTiger request queue.

  • mongodb.wiredTiger.write_concurrent_trans_available: the number of concurrent write transactions available in a WiredTiger request queue.

  • mongodb.wiredTiger.read_concurrent_trans_available: the number of concurrent read transactions available in a WiredTiger request queue.

Note

These metrics are supported only for replica set instances of the standard edition.

WiredTiger

The performance trends of the cache metrics of the WiredTiger engine used by the instance. Related metrics:

  • mongodb.wiredTiger.cache.pages.read.into.cache: the amount of data that is read into the cache.

  • mongodb.wiredTiger.cache.pages.written.from.cache: the amount of data that is written from the cache to the disk.

  • mongodb.wiredTiger.cache.maximum.bytes.configured: the maximum available disk size that you can configure.

Note

These metrics are supported only for replica set instances of the standard edition.

  • Standalone instance

  • Replica set instance

  • Sharded cluster instance

  • Serverless RDS instances

Disk usage

mongodb.disk_usage: the disk usage of the instance.

QPS

The performance trends of the QPS of the instance. Related metrics:

  • mongodb.opcounters.insert: the number of insert operations.

  • mongodb.opcounters.query: the number of query operations.

  • mongodb.opcounters.update: the number of update operations.

  • mongodb.opcounters.delete: the number of delete operations.

  • mongodb.opcounters.getmore: the number of read operations.

  • mongodb.opcounters.command: the number of command operations.

Connections

mongodb.connections.current: the total number of connections to the instance.

Network traffic

The performance trends of the network traffic of the instance. Related metrics:

  • mongodb.network.bytesIn: the inbound network traffic.

  • mongodb.network.bytesOut: the outbound network traffic.

  • mongodb.network.numRequests: the number of requests that are processed.

  • Replica set instance

  • Sharded cluster instance

IOPS usage

The performance trends of the IOPS usage of the instance. Related metrics:

  • mongodb.iops.data_iops: the number of read and write operations performed on the data disk.

  • mongodb.iops.log_iops: the number of read and write operations performed on the log disk.

IOPS utilization

mongodb.iops_usage: the IOPS utilization of the instance.

Note

The IOPS usage and IOPS utilization of a replica set or sharded cluster instance that runs MongoDB 4.2 and uses cloud disks cannot be queried.

Replica set instance

GlobalLock

The performance trends of a global lock of the instance. Related metrics:

  • mongodb.globalLock.currentQueue.total: the number of operations queued waiting for a global read and write lock.

  • mongodb.globalLock.currentQueue.writers: the number of operations queued waiting for a global write lock.

  • mongodb.globalLock.currentQueue.readers: the number of operations queued waiting for a global read lock.