Amazon CloudWatch metrics for Performance Insights - Amazon DocumentDB

Amazon CloudWatch metrics for Performance Insights

Performance Insights automatically publishes metrics to Amazon CloudWatch. The same data can be queried from Performance Insights, but having the metrics in CloudWatch makes it easy to add CloudWatch alarms. It also makes it easy to add the metrics to existing CloudWatch Dashboards.

Metric Description

DBLoad

The number of active sessions for Amazon DocumentDB. Typically, you want the data for the average number of active sessions. In Performance Insights, this data is queried as db.load.avg.

DBLoadCPU

The number of active sessions where the wait state type is CPU. In Performance Insights, this data is queried as db.load.avg, filtered by the wait state type CPU.

DBLoadNonCPU

The number of active sessions where the wait state type is not CPU.

Note

These metrics are published to CloudWatch only if there is load on the DB instance.

You can examine these metrics using the CloudWatch console, the AWS CLI, or the CloudWatch API.

For example, you can get the statistics for the DBLoad metric by running the get-metric-statistics command.

aws cloudwatch get-metric-statistics \ --region ap-south-1 \ --namespace AWS/DocDB \ --metric-name DBLoad \ --period 360 \ --statistics Average \ --start-time 2022-03-14T8:00:00Z \ --end-time 2022-03-14T9:00:00Z \ --dimensions Name=DBInstanceIdentifier,Value=documentdbinstance

This example generates output similar to the following.

{ "Datapoints": [ { "Timestamp": "2022-03-14T08:42:00Z", "Average": 1.0, "Unit": "None" }, { "Timestamp": "2022-03-14T08:24:00Z", "Average": 2.0, "Unit": "None" }, { "Timestamp": "2022-03-14T08:54:00Z", "Average": 6.0, "Unit": "None" }, { "Timestamp": "2022-03-14T08:36:00Z", "Average": 5.7, "Unit": "None" }, { "Timestamp": "2022-03-14T08:06:00Z", "Average": 4.0, "Unit": "None" }, { "Timestamp": "2022-03-14T08:00:00Z", "Average": 5.2, "Unit": "None" } ], "Label": "DBLoad" }

For more information about CloudWatch, see What is Amazon CloudWatch? in the Amazon CloudWatch User Guide.