Ensure that the Profiler feature is enabled for your Amazon DocumentDB database clusters in order to log the execution time and details of database operations that were performed on your clusters. The Profiler can be enabled at the cluster level and works on all databases available within the cluster. When enabled, the feature logs operations that are taking longer than a customer-defined threshold value to Amazon CloudWatch Logs. Logged details include the profiled command, time, plan summary, and client metadata. After the database operations are logged to CloudWatch Logs, you can use Amazon CloudWatch Logs Insights to analyze, monitor, and archive your Amazon DocumentDB profiling data. By default, the Profiler feature is disabled for Amazon DocumentDB database clusters.
This rule can help you work with the AWS Well-Architected Framework.
efficiency
excellence
Monitoring your Amazon DocumentDB database clusters is an important part of keeping your applications healthy and functioning optimally. The Profiler is useful for monitoring the slowest operations on your database cluster which can help you improve individual query performance and overall cluster performance.
Audit
To determine if your Amazon DocumentDB clusters are exporting profiler logs to CloudWatch Logs, perform the following operations:
Remediation / Resolution
To enable the Profiler feature for your Amazon DocumentDB database clusters and start exporting profiler logs to CloudWatch Logs, perform the following operations:
References
- AWS Documentation
- Profiling Amazon DocumentDB Operations
- Monitoring Amazon DocumentDB
- Modifying Amazon DocumentDB cluster parameter groups
- Describing Amazon DocumentDB clusters
- Modifying an Amazon DocumentDB cluster
- AWS Command Line Interface (CLI) Documentation
- docdb
- describe-db-clusters
- modify-db-cluster-parameter-group
- modify-db-cluster