You can create an alert rule to monitor your resource usage. If a resource's metric meets the alert condition, the system automatically sends an alert. This allows you to quickly identify and address abnormal monitoring data.
Procedure
Log on to the API Gateway console.
-
In the left-side navigation pane, choose Alert and then click Create Alert Rule.
-
On the Create Alert Rule panel, configure the parameters for the alert rule.
Parameter
Description
Resource Scope
The resources to which the alert rule applies. Valid values:
-
All Resources: The alert rule applies to all resources of the specified cloud product, including resources that are added later.
-
Instance: The alert rule applies to selected resources.
Rule Description
The conditions that trigger an alert. To configure these conditions:
-
Click Add Rule.
-
In the Configure Rule Description panel, enter a name in the Rule Name field, and then set the rule conditions.
-
Simple Metric: Select a metric, and then set its threshold and alert level.
-
Combined Metrics: Select an alert level, and then set alert conditions for two or more metrics.
-
Expression: Select an alert level, and then set an alert expression.
-
Dynamic Threshold: For more information about dynamic thresholds, see Overview and Create a dynamic threshold alert rule.
-
-
Click OK.
NoteFor more information about how to configure complex alert conditions, see Expressions for alert rules.
Mute Period
The interval at which an alert is resent if the alert is not resolved. Valid values: 1 minute, 5 minutes, 15 minutes, 30 minutes, 60 minutes, 3 hours, 6 hours, 12 hours, and 24 hours.
When a metric exceeds its alert threshold, an alert is sent. If the metric continues to exceed the threshold, no additional notifications are sent during the mute period. If the metric still exceeds the threshold after the mute period, CloudMonitor sends another alert.
For example, if you set Mute Period to 12 Hours, CloudMonitor resends an alert after 12 hours if the alert is not resolved.
Effective Period
The time period during which the alert rule is active and can send notifications.
NoteWhen an alert rule is outside its effective period, no notifications are sent, but the alert history is still recorded in the Alert History List list.
Tag
The tag of the alert rule. A tag consists of a Tag Key and a Tag Value.
NoteYou can add a maximum of six tags.
Alert Contact Group
The group of contacts that receives alerts.
Alerts for an application group are sent to the alert contacts in the specified alert contact group. An alert contact group can contain one or more alert contacts.
For more information about how to create alert contacts and alert contact groups, see Create an alert contact or an alert contact group.
Advanced Settings
Alarm callback
A public URL to which CloudMonitor sends alert information via POST requests. Only the HTTP protocol is supported. For more information about how to configure an alert callback, see Use threshold alert callbacks.
To test the connectivity of the alert callback URL, perform the following steps:
-
Click test next to the callback URL.
In the Webhook Test panel, you can check the URL's connectivity based on the status code returned by the Webhook and the detailed test results.
NoteYou can also configure the callback template type and language for the Webhook, and then click test again to obtain the corresponding test results.
-
Click Close.
Push Channel
Pushes raw or merged and denoised alert data to a specified cloud product. The following push channels are supported:
-
Auto Scaling: An alert triggers a corresponding scaling rule. You must specify the Region, scaling group, and scaling rule.
-
Simple Log Service: Alerts are pushed to a specified Logstore in Log Service. You must specify the Region and ProjectName and Logstore.
-
Simple Message Queue (formerly MNS) - Topic: Alerts are pushed to a specified topic or queue in Simple Message Queue (formerly MNS). You must specify the Region and topicName for Simple Message Queue (formerly MNS).
-
Function Compute: Alerts are pushed to a specified function in Function Compute. You must specify the Region and Service and Function.
NoDataPolicy
The action to take when no monitoring data is found. Valid values:
-
Do not do anything (default)
-
Send alert notifications
-
Treated as normal
-
-
Click OK.