ApsaraDB for MongoDB provides the monitoring data feature to monitor the running status of nodes in an ApsaraDB for MongoDB instance. You can view metrics such as the CPU utilization and memory usage of an ApsaraDB for MongoDB instance in the Monitoring Data module.
Usage notes
When you receive an alert message from Alibaba Cloud, such as a message indicating that the CPU utilization of your instance exceeds 80%, you can view the monitoring data of the instance in the ApsaraDB for MongoDB console to troubleshoot the issue. You can filter the nodes of the instance to check the status of each node and locate the node where the issue occurs.
Monitoring data is retained for up to 30 days. The monitoring data that was generated more than 30 days ago cannot be viewed.
The IOPS Usage and IOPS Usage (%) metrics of the following instances cannot be displayed in the ApsaraDB for MongoDB console: standalone instances, replica set instances that run MongoDB 4.2 and use cloud disks, and sharded cluster instances that run MongoDB 4.2 and use cloud disks.
The IOPS Usage and IOPS Usage (%) metrics of the preceding instances are displayed as 0 on the Monitoring Data page in the console, which do not indicate the actual IOPS usage.
Collection interval
ApsaraDB for MongoDB allows you to select a collection interval (interval between two monitoring points in time) in the ApsaraDB for MongoDB console. The following collection intervals are available: 5 seconds, 30 seconds, 1 minute, 10 minutes, 30 minutes, 1 hour, and 1 day.
If you set the monitoring time range to 1 day and the collection interval to 1 minute, the monitoring curve consists of 1,440 monitoring points in time.
The collection interval range depends on the monitoring time range. The following table describes the monitoring time ranges and corresponding collection interval ranges.
Monitoring time range | Minimum collection interval | Maximum collection interval |
From 1 minute to 10 minutes | 5 seconds | 1 minute |
Greater than 10 minutes and less than or equal to 30 minutes | 5 seconds | 10 minutes |
Greater than 30 minutes and less than or equal to 1 hour | 5 seconds | 30 minutes |
Greater than 1 hour and less than or equal to 1 day | 1 minute | 1 hour |
Greater than 1 day and less than or equal to 7 days | 30 minutes | 1 day |
Select a proper monitoring time range and collection interval. If the selected monitoring time range is less than two times of the selected collection interval, a monitoring chart contains only a monitoring point in time that cannot form a curve.
Procedure
Go to the Replica Set Instances or Sharded Cluster Instances page. In the top navigation bar, select the region in which the instance resides. Then, find the instance and click the ID of the instance.
In the left-side navigation pane of the instance details page, click Monitoring Data.
Click the Basic Monitoring tab.
Select the node whose monitoring data you want to view based on instance architecture.:
Replica set instance
In the upper-left corner of the Basic Monitoring tab, you can select a primary, secondary, or read-only node to view the corresponding monitoring data.
NoteIf you select a role but not a node, the monitoring chart of a metric displays the aggregated results of the average metric values of all nodes that belong to the role.
Sharded cluster instance
In the upper part of the Basic Monitoring tab, you can select a mongos, shard, or ConfigServer node to view the corresponding monitoring data.
If you click Shard, you can select a primary, secondary, or read-only node to view the corresponding monitoring data.
NoteIf you select a role but not a node, the monitoring chart of a metric displays the aggregated results of the average metric values of all nodes that belong to the role.
Standalone instance
You can view the monitoring data of a primary node.
Click the time range picker in the upper-right corner to specify a time range.
Click Instance Sampling Interval in the upper-left corner of all monitoring charts to change the collection interval of monitoring data.
View monitoring data. You can move the pointer over a point in time of a metric to view the details of the instance metric at the point in time. For more information about the metrics that you can view, see Monitoring items and metrics.