Manage alert rules
MSE provides application monitoring and alerting. When an alert condition is met, MSE sends real-time notifications through channels like email, SMS, and DingTalk, helping you detect anomalies. This topic describes how to create and manage alert rules.
Prerequisites
Background information
An alert control is essentially a visual representation of a dataset. Creating an alert control automatically creates a corresponding dataset to store its data.
A new alert rule takes effect in about 10 minutes. Alert evaluation may be delayed by 1 to 3 minutes.
Create an alert rule
Log in to the MSE console and select a region from the top navigation bar.
In the left-side navigation pane, choose Microservices Registry > Alerts > Alert rule management.
On the MSE alert list page, click Create MSE Alert Rule.
On the Create MSE Alert Rule page, configure the alert-related parameters, and then click Save.
Parameter
Description
Alert name
Enter a name for the alert rule.
MSE instance
Select the target cluster. The cluster's registry and configuration center type, such as Nacos or ZooKeeper, is displayed in parentheses (
) after the cluster name. Currently, only Nacos and ZooKeeper instances are supported.Alert group
Select the group for the alert metrics.
Alert metric
Select a metric to monitor. Available metrics depend on the selected alert group.
Alert condition
Set the condition that triggers the alert. For example, you can trigger an alert when the number of services exceeds 100.
Filter conditions
The default value is No Filter. No configuration is required.
Duration
The duration for which an alert condition must persist before an alert is triggered.
Alert level
Set the severity level for the alert. The severity levels, from lowest to highest, are Default, P4, P3, P2, and P1.
Alert message
Set the content of the notification message sent when an alert is triggered. You can use Go template syntax to customize parameter variables in the message. For example:
Alerting cluster ID: {{$label.service_cluster_id}} Alerting cluster node: {{$label.kubernetes_pod_name}} Configured threshold: {{$labels.metrics_params_value}} Actual value that triggered the alert: {{ printf "%.2f" $value }}The alert message content automatically adjusts based on the selected alert metric.
Alert notification
Select a mode and configure its settings. You can choose Simple Mode or Standard Mode.
Notification policy
This parameter is required only when Alert notification is set to Standard Mode.
Based on the configured notification policy, the ARMS alert center dispatches, processes, and sends notifications for any generated alert event.
You can click Create notification policy to quickly create a policy, or create a custom policy on the Notification policies page and then select it here. For more information, see Notification policies.
Advanced settings
Alert check interval
The check interval for the alert rule. The default value is 1 minute.
Check after data is complete
Check the alert condition only after data collection for a cycle is complete.
Tag
Click Create tag to add tags to the alert rule. These tags can be used as conditions in dispatching rules.
Annotations
Click Create annotation, set key to message, and set value to {{variable_name}} alert message. After configuration, the format is
message:{{$labels.pod_name}} restart alert message, for example,message:{{$labels.pod_name}} restart.
What to do next
Created alert rules appear on the MSE alarm list page.
On the MSE alarm list page, you can perform the following operations on an alert rule in the Actions column:
To edit an alert rule, click Edit, modify the alert rule on the Edit MSE Alert Rule page, and then click Done.
To Enable or disable an alert rule, click Enable or Disable, and in the prompt dialog box, click Confirm.
To delete an alert rule, click Delete, and then click OK in the confirmation dialog box.
To view the alert history, click Alert event history. The Event list page displays historical alert information.
Optional: To manage multiple alert rules at once, select the rules, and then click Batch Operations > Enable alert rules, Disable alert rules, Delete alert rules, or Set tags. In the confirmation dialog box that appears, click OK.