The monitoring feature in ApsaraDB for MongoDB tracks the running status of resources on each node of an instance. You can use this feature to view the status of common resources, such as CPU usage and memory usage.
Precautions
If you receive an alert from Alibaba Cloud, such as a notification that CPU usage exceeds 80%, you can investigate the issue by viewing the instance's monitoring data. You can then filter the data by node to identify any abnormalities.
Monitoring data is stored for 30 days. You cannot view data that is more than 30 days old.
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 granularity
ApsaraDB for MongoDB lets you select the collection granularity for monitoring. Granularity is the time interval between data points. Supported granularities are 5 seconds, 30 seconds, 1 minute, 10 minutes, 30 minutes, 1 hour, and 1 day.
For example, if you view monitoring data for a 1-day period with a 1-minute granularity, the monitoring curve consists of 1,440 data points.
The available collection granularities depend on the selected time range:
Monitoring time range | Minimum collection granularity | Maximum collection granularity |
>= 1 minute and <= 10 minutes | 5 seconds | 1 minute |
> 10 minutes and <= 30 minutes | 5 seconds | 10 minutes |
> 30 minutes and <= 1 hour | 5 seconds | 30 minutes |
> 1 hour and <= 1 day | 1 minute | 1 hour |
> 1 day and <= 7 days | 30 minutes | 1 day |
> 7 days and <= 30 days | 1 day | 1 day |
Select an appropriate time range and collection granularity. If the time range is shorter than two granularity intervals, the monitoring graph shows only one data point and cannot form a curve.
Procedure
Go to the MongoDB Replica Set Instances or MongoDB Sharded Cluster Instances page. In the top navigation bar, select a resource group and region, and then click the ID of the target instance.
In the navigation pane on the left of the instance details page, click Monitoring Data.
Click the Node Monitoring tab.
Select a node to view its monitoring data. The nodes that you can select vary based on the instance type.
Replica set
In the upper-left corner of the page, select a Primary, Secondary, or Read-only node to view its monitoring data.
NoteIf you select a role but not a specific node, the monitoring graph shows the average of the metric values for all nodes with that role.
Sharded cluster
In the upper-left corner of the page, select a Mongos, shard, or Configserver (CS) node to view its monitoring data.
If you select a shard node, you can then select a Primary, Secondary, or Read-only node to view its monitoring data.
NoteIf you select a role but not a specific node, the monitoring graph shows the average of the metric values for all nodes with that role.
Single node
You can directly view the monitoring data for the Primary node.
To change the time range, click the time range in the upper-right corner of the page.
To change the collection granularity, click the collection granularity in the upper-left corner of the monitoring graph.
View the monitoring data. Hover over a data point on a metric's trend graph to view detailed information for that specific time.
For more information about the monitoring metrics and their descriptions, see Metric descriptions.