All Products
Search
Document Center

ApsaraDB for MongoDB:Monitoring items and metrics

Last Updated:Jul 14, 2023

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.

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.

cursors

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

  • total_open: the number of open cursors.

  • timed_out: the number of cursors that timed out.

Read and write queue length

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

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

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

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

Number of WiredTiger transactions

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

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

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

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

  • read_concurrent_trans_available: the available number of concurrent read transactions allowed into the WiredTiger storage 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

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

  • bytes_read_into_cache: the amount of data that is read into the cache.

  • bytes_written_from_cache: the amount of data that is written from the cache to the disk.

  • maximum_bytes_configured: the maximum available disk size that you can configure.

  • Standalone instance

  • Replica set instance

  • Sharded cluster instance

  • Serverless instance

Disk usage

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

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.

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.

Network traffic

The network traffic of the instance. Related metrics:

  • bytes_in: the inbound network traffic.

  • bytes_out: the outbound network traffic.

  • num_requests: the number of requests that are processed.

  • Replica set instance

  • Sharded cluster instance

IOPS usage

The IOPS usage of the instance. Related metrics:

  • data_iops: the IOPS usage of the data disk.

  • log_iops: the IOPS usage of the log disk.

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.

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 latency between the primary and secondary nodes of a replica set instance and the latency between the shard and Configserver nodes of a sharded cluster instance can be -2 to 2 seconds. This is because the heartbeat interval between replica set instances is 2 seconds.

Serverless instance

Number of requests

sl_qps: the number of requests per second.

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 storage engine. Related metrics:

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

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

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

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

I/O latency

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

WiredTigerCache 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 instance

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 metric:

  • 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

The IOPS usage of the instance. Related metrics:

  • data_iops: the IOPS usage of the data disk.

  • log_iops: the IOPS usage of the log disk.

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.

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 latency between the primary and secondary nodes of a replica set instance and the latency between the shard and Configserver nodes of a sharded cluster instance can be -2 to 2 seconds. This is because the heartbeat interval between replica set instances is 2 seconds.

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 requests.

  • mongodb.wiredTiger.read_concurrent_trans_out: the number of concurrent read requests.

  • mongodb.wiredTiger.write_concurrent_trans_available: the number of concurrent write requests that are available.

  • mongodb.wiredTiger.read_concurrent_trans_available: the number of concurrent read requests that are available.

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 instance

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

Th 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.