All Products
Search
Document Center

Managed Service for OpenTelemetry:Notification policies

Last Updated:Feb 28, 2025

Managed Service for OpenTelemetry lets you set up notification policies and define specific rules to match alert events. When a rule is matched, the notification objects that you specify are automatically alerted using the specified notification methods.

Prerequisite

A notification object is created.

Create a notification policy

  1. Log on to the Managed Service for OpenTelemetry console. In the left-side navigation pane, choose Alert Management > Alarm policy.

  2. On the Notification Policy tab page, click Create Notification Policy and enter a notification policy name.

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

    Important

    Silence policies take precedence over notification policies. Alert events that match a silence policy are silenced and cannot be matched by a notification policy.

    1. Select a data source.

      • If you specify a source for alert events, the silence policy will filter alerts from the designated source using configured matching rules.

      • If you select No Preset Source, the silence policy will filter all alerts using configured matching rules.

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

      The following tags are available:

      • 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 provided by ARMS, described below:

        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.

        pod_name

        The name of the pod.

        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 only a single condition is met, click + Add Rule to add a matching rule.

    3. Click Next.

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

    • When grouping is not required, all alert events are sent to the contacts in an alert notification.

    • When grouping is enabled, you must also specify a field. Alert events sharing a field value are grouped together. Each group of alert events is sent to contacts in one alert notification.

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

    1. Click + Add Notification Object to select contacts.

      Contact types:Notification Policy - When an Alert is Generated

      • 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 alert 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 select Send Notifications, the status of an alert automatically changes to Resolved when all events related to the alert are handled. When the 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.

  6. 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.

  7. 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.

  8. Click Save.

Manage notification policies

On the Notification Policy tab, you can perform the following actions:

  • Edit: Click a policy name or click Edit in the Actions column. In the panel that appears, change the settings and click Save.

  • Enable or disable: Turn the switch on or off in the Status column.

  • Delete: Click Delete in the Actions column. In the dialog box that appears, click OK.

  • Copy: Click Copy in the Actions column to create an identical one.