View a markdown version of this page

Monitoring Amazon DocumentDB with CloudWatch - Amazon DocumentDB

Monitoring Amazon DocumentDB with CloudWatch

Amazon DocumentDB (with MongoDB compatibility) integrates with Amazon CloudWatch so that you can gather and analyze operational metrics for your clusters. You can monitor these metrics using the CloudWatch console, the Amazon DocumentDB console, the AWS Command Line Interface (AWS CLI), or the CloudWatch API.

CloudWatch also lets you set alarms so that you can be notified if a metric value breaches a threshold that you specify. You can even set up Amazon CloudWatch Events to take corrective action if a breach occurs. For more information about using CloudWatch and alarms, see the Amazon CloudWatch documentation.

Amazon DocumentDB metrics

To monitor the health and performance of your Amazon DocumentDB cluster and instances, you can view the following metrics in the Amazon DocumentDB console.

Note

Metrics in the following tables apply to both instance-based and elastic clusters.

Resource utilization metrics

Metric Description
BackupRetentionPeriodStorageUsed The total amount of backup storage in bytes used to support the point-in-time restore feature within the Amazon DocumentDB's retention window. Included in the total reported by the TotalBackupStorageBilled metric. Computed separately for each Amazon DocumentDB cluster.
ChangeStreamLogSize The amount of storage used by your cluster to store the change stream log in megabytes. This value is a subset of the total storage for the cluster (VolumeBytesUsed) and affects the cost of the cluster. For storage pricing information, see the Amazon DocumentDB product page. The change stream log size is a function of how much change is happening on your cluster and the change stream long retention duration. For more information on change streams, see Using change streams with Amazon DocumentDB.
CPUUtilization The percentage of CPU used by an instance.
DatabaseConnections The number of connections (active and idle) open on an instance taken at a 1-minute frequency.
DatabaseConnectionsMax The maximum number of open database connections (active and idle) on an instance in a 1-minute period.
DatabaseConnectionsLimit The maximum number of concurrent database connections (active and idle) allowed on an instance at any given time.
DatabaseConnectionsActiveMax The maximum number of active database connections on an instance in a 1-minute period. Active connections are those currently running an operation, as opposed to idle connections. For the active connection quotas per instance type, see Instance quotas.
DatabaseCursors The number of cursors open on an instance taken at a 1-minute frequency.
DatabaseCursorsMax The maximum number of open cursors on an instance in a 1-minute period.
DatabaseCursorsLimit The maximum number of cursors allowed on an instance at any given time.
DatabaseCursorsTimedOut The number of cursors that timed out in a 1-minute period.
FreeableMemory The amount of available random access memory, in bytes.
FreeLocalStorage

This metric reports the amount of storage available to each instance for temporary tables and logs. This value depends on the instance class. You can increase the amount of free storage space for an instance by choosing a larger instance class for your instance. (This doesn't apply to DocumentDB Serverless.)

LowMemThrottleQueueDepth

The queue depth for requests that are throttled due to low available memory taken at a 1-minute frequency.

LowMemThrottleMaxQueueDepth

The maximum queue depth for requests that are throttled due to low available memory in a 1-minute period.

LowMemNumOperationsThrottled

The number of requests that are throttled due to low available memory in a 1-minute period.

SnapshotStorageUsed The total amount of backup storage in bytes consumed by all snapshots for a given Amazon DocumentDB cluster outside its backup retention window. Included in the total reported by the TotalBackupStorageBilled metric. Computed separately for each Amazon DocumentDB cluster.
SwapUsage The amount of swap space used on the instance.
TotalBackupStorageBilled The total amount of backup storage in bytes for which you are billed for a given Amazon DocumentDB cluster. Includes the backup storage measured by the BackupRetentionPeriodStorageUsed and SnapshotStorageUsed metrics. Computed separately for each Amazon DocumentDB cluster.
TransactionsOpen The number of transactions open on an instance taken at a 1-minute frequency.
TransactionsOpenMax The maximum number of transactions open on an instance in a 1-minute period.
TransactionsOpenLimit The maximum number of concurrent transactions allowed on an instance at any given time.
VolumeBytesUsed The amount of storage used by your cluster in bytes. This value affects the cost of the cluster. For pricing information, see the Amazon DocumentDB product page.

Latency metrics

Metric Description
DBClusterReplicaLagMaximum The maximum amount of lag, in milliseconds, between the primary instance and each Amazon DocumentDB instance in the cluster.
DBClusterReplicaLagMinimum The minimum amount of lag, in milliseconds, between the primary instance and each replica instance in the cluster.
DBInstanceReplicaLag The amount of lag, in milliseconds, when replicating updates from the primary instance to a replica instance.
ReadLatency The average amount of time taken per disk I/O operation.
WriteLatency The average amount of time, in milliseconds, taken per disk I/O operation.

NVMe-backed instance metrics

Metric Description
NVMeStorageCacheHitRatio The percentage of requests that are served by the tiered cache.
FreeNVMeStorage The amount of available Ephemeral NVMe storage.
ReadIOPSNVMeStorage The average number of disk read I/O operations to Ephemeral NVMe storage.
ReadLatencyNVMeStorage The average amount of time taken per disk read I/O operation for Ephemeral NVMe storage.
ReadThroughputNVMeStorage The average number of bytes read from disk per second for Ephemeral NVMe storage.
WriteIOPSNVMeStorage The average number of disk write I/O operations to Ephemeral NVMe storage.
WriteLatencyNVMeStorage The average amount of time taken per disk write I/O operation for Ephemeral NVMe storage.
WriteThroughputNVMeStorage The average number of bytes written to disk per second for Ephemeral NVMe storage.

Operations metrics

Metric Description
DocumentsDeleted The number of deleted documents in a 1-minute period.
DocumentsInserted The number of inserted documents in a 1-minute period.
DocumentsReturned The number of returned documents in a 1-minute period.
DocumentsUpdated The number of updated documents in a 1-minute period.
OpcountersCommand The number of commands issued in a 1-minute period.
OpcountersDelete The number of delete operations issued in a 1-minute period.
OpcountersGetmore The number of getmores issued in a 1-minute period.
OpcountersInsert The number of insert operations issued in a 1-minute period.
OpcountersQuery The number of queries issued in a 1-minute period.
OpcountersUpdate The number of update operations issued in a 1-minute period.
TransactionsStarted The number of transactions started on an instance in a 1-minute period.
TransactionsCommitted The number of transactions committed on an instance in a 1-minute period.
TransactionsAborted The number of transactions aborted on an instance in a 1-minute period.
TTLDeletedDocuments The number of documents deleted by a TTLMonitor in a 1-minute period.

Command-level metrics

Amazon DocumentDB publishes per-command latency and concurrency metrics to CloudWatch. These metrics help you identify which operations contribute most to your workload and detect tail-latency issues or concurrency pressure.

Each command in the following table emits three metrics in a 1-minute period:

  • AvgDuration — The average execution time of the command, in microseconds.

  • P100Duration — The maximum execution time of the command (100th percentile), in microseconds.

  • MaxConcurrent — The maximum number of concurrent executions of the command.

Metric names follow the pattern Command.commandName.metricName. For example, Command.find.AvgDuration or Command.aggregate.MaxConcurrent.

Metric Description
Command.find Read queries using find.