Microservices Engine (MSE) monitors your registry instances and sends alert notifications through email, text message, or DingTalk when metrics exceed defined thresholds. Alert rules help you detect anomalies early and reduce incident response time.
Alert rules are supported for Nacos and ZooKeeper instances only.
Prerequisites
Before you begin, ensure that you have:
A contact group. To create one, see the "Create a contact group" section in Manage alert contacts
How alert rules work
Each alert rule creates an alert control backed by a dataset that stores monitoring data. MSE periodically evaluates rule conditions against this data and triggers notifications when thresholds are breached.
A new alert rule takes effect within 10 minutes.
The system determines whether to generate an alert based on an alert rule within 1 to 3 minutes.
Create an alert rule
-
Log on to the MSE console, and select a region in the top navigation bar.
-
In the left-side navigation pane, choose Microservices Registry > Alerts > Alert Policies.
In the upper-left corner of the MSE Alert List page, click Create MSE Alert Rule.
On the Create MSE Alert Rule page, configure the following settings and click Save.
Basic settings
Parameter
Description
Alert Rule Name
A descriptive name for the alert rule.
MSE Instance
The MSE instance to monitor. The instance type (Nacos or ZooKeeper) appears in parentheses next to the instance name.
Alert Contact Group
The contact group that receives alert notifications.
Alert conditions
Parameter
Description
Alert Metric
The metric to monitor. Available metrics vary based on the alert group that you specify.
Alert Condition
The threshold that triggers the alert. For example, fire an alert when the number of services exceeds 100.
Filter Conditions
Keep the default value No Filter.
Duration
How long the condition must persist before the alert fires.
Alert Level
The severity of the alert. Valid values: Default, P4, P3, P2, and P1. Severity increases from Default to P1.
Alert message
Parameter
Description
Alarm Message
The notification content displayed when an alert fires. Use Go template syntax to insert dynamic variables. Available variables depend on the selected alert metric.
Alarm Message template example:
Instance ID: {{$label.service_cluster_id}} Node name: {{$label.kubernetes_pod_name}} Metric threshold: {{$labels.metrics_params_value}} Actual value: {{ printf "%.2f" $value }}Notification settings
MSE supports two notification modes:
Simple Mode sends notifications directly to the specified contact group.
Standard Mode routes alerts through the Application Real-Time Monitoring Service (ARMS) alert center, which dispatches and processes alert events based on a notification policy.
Parameter
Description
Alert Notification
The notification mode: Simple Mode or Standard Mode.
Specify Notification Policy
Required for Standard Mode only. Select an existing notification policy from the drop-down list, or click Create Notification Policy to configure a new one on the Notification Policy page. For details, see Create and manage a notification policy.
Advanced settings
Parameter
Description
Alert Check Cycle
How often the alert rule is evaluated, in minutes. Default: 1.
Check after the data is complete
Whether to wait for data integrity before evaluating the rule.
Tags
Click Create Tag to add tags. Tags serve as matching criteria in dispatching rules.
Annotations
Click Create Annotation. Set Key to
messageand Value to a string in the format{{Variable name}} Alert information. Example:message:{{$labels.pod_name}} Restart.
Manage existing alert rules
All alert rules are listed on the MSE Alert List page. Use the Actions column to manage individual rules, or select multiple rules for batch operations.
Edit an alert rule
Find the alert rule and click Edit.
On the Edit MSE Alert Rule page, update the parameters.
Click Completed.
Enable or disable an alert rule
Find the alert rule and click Start to enable it, or Stop to disable it.
Click OK in the confirmation dialog box.
Delete an alert rule
Find the alert rule and click Delete.
Click OK in the confirmation dialog box.
View alert history
Find the alert rule and click Alert Event History to view historical alert records on the Events page.
Batch operations (optional)
To manage multiple alert rules at once:
Select the target alert rules on the MSE Alert List page.
Click Batch Operations and select an option:
Enable Alert Rules
Disable Alert Rules
Delete Alert Rules
Configure Tags
Click OK in the confirmation dialog box.