All Products
Search
Document Center

Application Real-Time Monitoring Service:Create and manage a notification policy

最終更新日:Nov 04, 2024

Application Real-Time Monitoring Service (ARMS) allows you to create notification policies and specify matching rules for alert events. If a matching rule is triggered, alert notifications are sent to the contacts by using the specified notification methods. This way, the contacts can resolve issues at the earliest opportunity.

Prerequisites

Contacts are created. For more information, see Overview.

Create a notification policy

  1. Log on to the ARMS console. In the left-side navigation pane, choose Alert Management > Notification Policies.
  2. In the upper-right corner of the Notification Policies page, click Create Notification Policy.

  3. In the upper part of the Create Notification Policy page, enter a notification policy name.

  4. In the Matching Rule step, configure a matching rule for alert events.

    1. Select a data source.

      • If you specify a source of alert events, ARMS processes alert events of the specified data source and sends alert notifications based on the matching rule that you configured.

      • If you select No Preset Source, ARMS processes all alert events and sends alert notifications based on the matching rule that you configured.

    2. Specify one or more expressions. You can add custom tags or select existing tags.

      Existing tags include:

      • The fields that are included in an alert rule expression. For information about how to create a tag for an alert rule in Managed Service for Prometheus, see Create an alert rule for a Prometheus instance.

      • The default tags that are provided by ARMS. The following table describes the default tags.

        Category

        Tag

        Description

        Common fields

        alertname

        The name of the alert.

        clustername

        The name of the Kubernetes cluster.

        severity

        The severity level of the alert. Valid values:

        • P1

        • P2

        • P3

        • P4

        • Default

        namespace

        The name of the namespace. For more information, see Namespaces in Kubernetes documentation.

        pod_name

        The name of the Pod. For more information, see Pods in Kubernetes documentation.

        Preset system fields

        _aliyun_arms_integration_name

        The name of the integration that you specified as the data source. By default, ARMS returns the integration name ARMS-DEFAULT.

        _aliyun_arms_involvedObject_id

        The ID of the object that triggers the alert.

        _aliyun_arms_involvedObject_name

        The name of the object that triggers the alert.

        _aliyun_arms_region_id

        The region ID of ARMS.

        _aliyun_arms_alert_rule_id

        The ID of the alert rule.

        _aliyun_arms_alert_type

        The type of the alert rule. Valid values:

        • 101: Prometheus alert

        • 5: Application Monitoring alert

        • 4: Browser Monitoring alert

      Note
      • If you want an alert to be triggered when multiple conditions are met at the same time, click + Add Condition to add a matching condition in the same matching rule.

      • If you want an alert to be triggered when one condition is met, click + Add Rule to add a matching rule.

    3. Click Next.

  5. In the Event Group step, select an option to specify whether to group alert events, and click Next.

    • If you specify that alert events are not grouped, all alert events are sent to the contacts in an alert notification.

    • If you specify that alert events are grouped, you must also specify a field. Alert events that have the same field value are grouped. Each group of alert events is sent to contacts in one alert notification.

  6. In the Notification Objects step, configure the following parameters.

    1. Click + Add Notification Object to select contacts.

      Contact types:

      通知策略-当告警生成时

      • Contact: When you select a contact, select a notification method, such as by phone call, text message, or email.

      • Contact group: When you select a contact group, select a notification method, such as by phone call, text message, or email.

      • Shift: When you select a shift, select a notification method, such as by phone call, text message, or email.

      • Instant messaging (IM) applications: You can send alert notifications to contacts from IM applications, including DingTalk, Lark, and WeCom.

      • Webhook: You can use a webhook to send alert notifications.

    2. Specify whether to send clearing notifications after an alert is cleared.

      If you choose to send clearing notifications after an alert is cleared, the status of an alert automatically changes to Resolved if all events related to the alert are handled. When an alert is cleared, the system sends clearing notifications to the contacts.

    3. Specify a notification template. For more information, see Configure a notification template and a webhook template.

    4. Specify the period of time during which alert notifications are sent.

    5. (Optional)Select the ticket system to which alert notifications are sent. For more information, see Notification integrations.

    6. Click Next.

  7. In the Policy to Repeat/Escalate/Clear Alerts step, specify whether to send repeated notifications or use an escalation policy, and click Next.

    • Whether to Resend Notifications: To send repeated notifications, specify the interval at which alert notifications are sent. Alert notifications are continuously sent at the specified interval until the alert is cleared.

    • Whether to configure an escalation policy for alerts:

      • If you do not use an escalation policy, an alert notification is sent only once before an alert is cleared.

      • If you use an escalation policy, an alert notification is sent to other notification objects based on the escalation policy until the alert is cleared.

    • Whether to enable manual recovery of alerts: After you enable manual recovery, an alert is not automatically cleared if an alert event is not triggered within the automatic recovery time that is set on the Alert Integrations tab of the Integrations page.

  8. In the Action Integration step, specify the automatic action after an alert is triggered or cleared. For more information, see Create an action integration to execute an alerting plan.

  9. Click Save.

Manage the notification policy

After you create a notification policy, the policy is displayed on the Notification Policies page. You can perform the following operations to manage notification policies on this page:

  • Modify a notification policy: Find the notification policy that you want to modify. Click the name of the notification policy or click Edit in the Actions column. After you modify the notification policy, click Save.

  • Enable or disable a notification policy: Turn on or turn off the Status switch.

  • Delete a notification policy: Find the notification policy that you want to delete, and click Delete in the Actions column. In the message that appears, click OK.

  • Duplicate a notification policy: Find the notification policy that you want to duplicate, and click Copy in the Actions column.