ApsaraDB for MongoDB allows you to configure threshold-triggered alert rules for important metrics of your instances. When the value of a metric is outside the specified threshold range, the system automatically sends an alert so you can promptly detect anomalies, locate issues, and take action. This topic describes how to configure a threshold-triggered alert rule in the ApsaraDB for MongoDB console.
Procedure
Log on to the ApsaraDB for MongoDB console.
In the left-side navigation pane, click Replica Set Instances or Sharded Cluster Instances based on the instance type.
In the upper-left corner of the page, select the resource group and region where the instance is located.
Click the ID of the target instance, or click Manage in the Actions column.
In the left-side navigation pane of the instance details page, click Alert Rules.
In the upper-left corner, click Set Alert Rule to go to the CloudMonitor console.
In the CloudMonitor console, configure a threshold-triggered alert rule for the ApsaraDB for MongoDB instance.
On the Alert Rules page, click Create Alert Rule.
In the Create Alert Rule panel, configure the parameters for the alert rule.
Parameter
Description
Service
The Alibaba Cloud service that is managed by CloudMonitor.
Based on the instance type, select ApsaraDB for MongoDB - Standalone Instance, ApsaraDB for MongoDB-Instance Copy, or ApsaraDB for MongoDB-Cluster Instance.
Resource Scope
The scope of resources to which the alert rule applies. Valid values:
All Resources: The alert rule applies to all resources of the specified cloud service.
Example: If you create an alert rule that is triggered when the CPU utilization of any ApsaraDB for MongoDB instance exceeds 80%, an alert is sent for any instance that meets this condition. An alert rule for all resources can apply to a maximum of 1,000 resources. If the number of resources exceeds this limit, alerts may not be triggered even if the threshold is met. We recommend that you use application groups to group resources based on your business requirements before you configure alert rules.
Application group: The alert rule applies to all resources within a specified application group of the selected cloud service.
Instance: The alert rule applies to one or more specified instances of the selected cloud service.
Example: If you create an alert rule for a specific instance, an alert is sent only when that instance's CPU utilization exceeds 80%.
Rule Description
The conditions that trigger an alert. To configure the conditions:
Click Add Rule.
In the Configure Rule Description panel, configure parameters such as the rule name, metric type, metric, threshold, and alert level.
Click Determine.
NoteYou can click Create Alert Rule to add multiple alert rules. The supported metrics vary by instance type. For more information, see the following topics:
Mute Period
The interval at which a new alert is sent if the issue persists. Valid values: 5 minutes, 15 minutes, 30 minutes, 60 minutes, 3 hours, 6 hours, 12 hours, and 24 hours.
The system sends an alert when a metric first exceeds its threshold. During the mute period, no new alerts are sent for that metric. If the metric is still outside its normal range after the mute period ends, the system sends another alert.
Effective Period
The period during which the alert rule is active. CloudMonitor checks monitoring data and triggers alerts only during this period.
Alarm Contact Group
The alert contact group that receives alert notifications.
Alert notifications for application groups are sent to the alert contacts in the specified alert contact group. An alert contact group can contain one or more alert contacts.
For information about how to create an alert contact and an alert contact group, see Create an alert contact or an alert contact group.
Tag
The tags of the alert rule. A tag consists of a tag key and a tag value.
Alarm callback
A publicly accessible URL that receives alert information from CloudMonitor through HTTP POST requests. Only the HTTP protocol is supported. For information about how to configure an alert callback, see Use an alert callback.
NoteClick Advance Settings to configure this parameter.
Auto Scaling
If you enable Auto Scaling, a corresponding scaling rule is triggered when an alert occurs. You must specify the Region, ESS Group, and ESS Rule.
For information about how to create a scaling group, see Configure a scaling group.
For information about how to create a scaling rule, see Configure a scaling rule.
NoteClick Advance Settings to configure this parameter.
Simple Log Service
If you enable Simple Log Service, alert information is written to a Logstore in Log Service when an alert is triggered. You must specify the Region, ProjectName, and Logstore.
For information about how to create a project and a Logstore, see Collect and analyze ECS text logs by using Logtail.
NoteClick Advance Settings to configure this parameter.
Simple Message Queue — topic
If you enable the Simple Message Queue — topic switch, alert information is written to a topic in Simple Message Queue when an alert is triggered. You must specify the region and topic.
For information about how to create a topic, see Create a topic.
NoteClick Advance Settings to configure this parameter.
Function Compute
If you enable Function Compute, alert notifications are sent to Function Compute for formatting and processing when an alert is triggered. You must specify the region, service, and function.
For information about how to create a service and a function, see Create a function.
NoteClick Advance Settings to configure this parameter.
NoDataPolicy
Specifies how to handle alerts when no monitoring data is available. Valid values:
Do not do anything (Default)
Send alert notifications
Consider as recovered
NoteClick Advance Settings to configure this parameter.
Click Confirm.
Once created, the rule appears in the alert rule lists on both the CloudMonitor console and the ApsaraDB for MongoDB console.
Related documents
You can also configure threshold-triggered and event-triggered alert rules in the CloudMonitor console. For more information, see Create an alert rule and Manage system event-triggered alert rules (Old).
Once an alert rule is configured, you can manage it in the CloudMonitor console. For more information, see: