ApsaraDB for MongoDB provides the instance monitoring and alerting feature. This topic describes how to configure common metrics such as disk usage, input/output operations per second (IOPS), connections, and CPU utilization.
- With the growth of business data, more performance resources of ApsaraDB for MongoDB instances are consumed. Sometimes performance resources may even be used up.
- For example, when a great number of slow queries occur, writing a large amount of
data causes performance resources of ApsaraDB for MongoDB instances exceptionally
Important Instances with insufficient disk space may be locked.
You can set alert rules for key performance metrics of instances to help you detect abnormal data and troubleshoot errors.
- Log on to the ApsaraDB for MongoDB console.
- In the upper-left corner of the page, select the resource group and region to which the instance belongs.
- In the left-side navigation pane, click Replica set instances or Sharded cluster instance based on the instance type.
- On the page that appears, find the instance that you want to manage and click its ID.
- In the left-side navigation pane, click Alert Rules.
- Click Set Alert Rule. You are redirected to the Cloud Monitor console.
- On the Threshold Value Alert tab of the Cloud Monitor console, click Create Alert Rule in the upper-right corner.
- On the Create Alert Rule page, configure related resource parameters.
Parameter Description ProductsThe architecture type of the instance. Valid values:
Note If you select ApsaraDB for MongoDB-Cluster Instance, you must specify the mongos and shard nodes to be monitored.
- ApsaraDB for MongoDB-Instance Copy
- ApsaraDB for MongoDB-Cluster Instance
- ApsaraDB for MongoDB-Single Node Instance
- All Resources: The alert rule is applicable to all ApsaraDB for MongoDB instances.
- Instances: The alert rule is applicable to the specified ApsaraDB for MongoDB instances.
RegionThe region where the instance is deployed. InstancesThe ID of the instance. You can select multiple instance IDs.
- Set alert rules. You can set the disk usage first, and then click Add Alert Rule Note
- If you set Rule Description to Disk Usage 5mins Average >= 80%, the alerting module checks the disk usage every 5 minutes to detect whether the average disk usage in the last 5 minutes is greater than or equal to 80%. You can adjust each alert threshold based on your business scenarios.
- If you select AnyRole for the Role parameter, the primary and secondary nodes for each instance are monitored.
- Set alert rules for IOPS, connections, and CPU utilization in the similar way to disk
- Set other parameters for alert rules.
Parameter Description Mute forSpecifies the mute period. If the alert is not cleared within the mute period, a new alert notification is sent when the mute period ends. Effective PeriodThe period when the alert rule takes effect.
- Set the notification method.
Parameter Description Notification ContactThe contacts or contact group to which an alert notification is sent. For more information, see Manage an alert contact or alert group. Notification MethodsThe notification methods corresponding to an alert severity, which can be Critical, Warning, or Info.
- Critical: phone calls, SMS messages, emails, and DingTalk ChatBot.
- Warning: SMS messages, emails, and DingTalk ChatBot.
- Info: emails and DingTalk ChatBot.
Email SubjectThe subject of the alert notification email. The default email subject is in the format of service name + metric name + instance ID. Email RemarkThe custom additional information in the alert notification email. Remarks will be included in the alert notification email if you specify this parameter. HTTP CallbackFor more information, see Use the alert callback feature.
- Click Confirm. Alert rules automatically take effect.
Was this helpful?