The cloud-native gateways of Microservice Engine (MSE) provide the alerting feature based on Application Real-Time Monitoring Service (ARMS). If alert conditions are met, MSE sends alert notifications by using emails, SMS messages, and DingTalk. This feature helps you identify exceptions in real time. On the Alerts page, you can manage custom alert rules of your account and query the history of alert events and alert notifications.

Prerequisites

Create contact groups

Background information

An alert widget is a data display method for datasets. When an alert widget is created, a dataset is also created to store the underlying data of the alert widget.

Note New alerts take effect within 10 minutes. A delay of 1 to 3 minutes may exist when MSE checks alerts.

Create an alert rule

  1. In the upper-right corner of the Policies page, click Create MSE Alert Rule.
  2. On the Create MSE Alert Rule page, configure the parameters and click Save. The following table describes the parameters.
    Table 1. Parameters
    Parameter Description
    Alert Name Enter a name for the alert rule.
    Gateway Select a cluster. Select a cluster from the drop-down list for the gateway.
    Alert Group Select an alert group. Valid value: Gateway Alert Group.
    Alert Metrics Select an alert metric. Alert metrics that are displayed in the drop-down list vary based on the alert group that you specify.
    Alert Conditions The conditions of the alert rule. For example, if the number of requests that the gateway receives per second reduces by 20% compared with the previous day, MSE sends alert notifications.
    Filter Conditions Default value: None. The default value indicates that no filter conditions are specified.
    Data Overview Click the blank area after you specify the alert condition. The system automatically displays the preview data of the alert rule that you want to create. You can specify an event cycle to filter data. If you move the pointer over the chart, the data at the specific point in time is displayed.
    Duration Specify the duration for which you want the alert condition to be met. If the duration for which you want the alert condition to be met elapses, an alert is triggered.
    Alert Level The alert level. By default, the alert level is set to Default, which has the lowest severity. Valid values: Default, P4, P3, P2, and P1.
    Alert Message The alert content that you want to display when an alert is triggered. You can configure alert variables for the Alert Message parameter by using the Go template syntax. Example:
    The ID of the cluster on which alerting is enabled: {{$label.envoy_clusterid}}
    The alert threshold that is specified: {{$labels.metrics_params_value}}
    The actual value based on which you want to trigger the alert: {{ printf "%.2f" $value }}

    The alert content varies based on the alert metrics.

    Notification Policy When an alert is triggered, the alert center distributes, denoises, and sends notifications based on the specified notification policy.
    Advanced Settings Click the Show icon icon to create a tag and an annotation for the alert rule.
    Tags Click Create Tag to create a tag for the alert rule. The tag is used as an option for the dispatching rule.
    Comments Click Create Annotation. Set Key to message and Value to {{variable name}} alert message. The specified annotation is in the message:{{$labels.pod_name}}Restart}}<Alert information> format. Example: message:{{$labels.pod_name}}Restart.

What to do next

  1. On the MSE Alert Policies page, find the alert rule that you want to manage and click an option in the Actions column to perform one of the following operations:
    • To modify the alert rule, click Edit. On the Edit Alert page, modify the alert rule and click Save.
    • To enable or disable the alert rule, click Enable or Disable. In the message that appears, click OK.
    • To delete the alert rule, click Delete. In the Cue message, click OK.
    • To view the alert history, click Alert History in the Actions column. On the Events page, you can view the historical alert information.
  2. Optional:If you want to manage multiple alert rules at a time, select the rules and perform one of the following operations:
    • To enable multiple alert rules at a time, click Batch Start Alert. In the message that appears, click OK.
    • To disable multiple alert rules at a time, click Batch Stop Alert. In the message that appears, click OK.
    • To delete multiple alert rules at a time, click Batch Delete Alert. In the message that appears, click OK.