All Products
Search
Document Center

ActionTrail:Manage an action policy

Last Updated:Jul 29, 2024

You can create an action policy to manage the sending method, frequency, and recipients of alert notifications. This way, users can be notified of exceptions at the earliest opportunity. This topic describes how to create, modify, and delete an action policy.

Create an action policy

By default, the built-in alert rules of ActionTrail reference the SLS actiontrail builtin action policy. You can also create custom action policies based on your business requirements.

  1. Log on to the ActionTrail console.

  2. In the left-side navigation pane, click Alerts.

  3. On the Alert Center page, choose Notification Management > Action Policy.

  4. Click Create.

  5. In the Add Action Policy dialog box, configure the ID and Name parameters.

  6. On the Primary Action Policy tab, create an action policy.

    1. Click the 条件 icon.

    2. Configure the conditions to trigger alert notifications and click Confirm.

      Parameter

      Description

      Example

      Condition

      Valid values:

      • All: The action policy is executed only if all alerts in an alert set meet the specified condition.

      • Any: The action policy is executed if one or more of the alerts in an alert set meet the specified condition.

      All

      Conditional expression

      Alerts that match a conditional expression are processed based on the action policy. You can specify an object, an operator, and an object value for the conditional expression.

      • Object: Alibaba Cloud Account ID

      • Operator: Equal to

      • Object value: 154035569884****

      Mode

      You can add multiple conditions in standard mode or advanced mode. Valid values:

      • Standard Mode: If you specify multiple conditions, the conditions are evaluated by using the AND operator.

      • Advanced Mode: If you specify multiple conditions, the conditions can be evaluated by using the AND or OR operator. You can also group multiple conditions into one group by using parentheses. Nested conditions are supported.

      Standard Mode

    3. Configure an action group.

      Configure the notification method and related parameters. Supported notification methods include text messages, voice calls, emails, DingTalk, webhooks, and Message Center. For more information, see Notification methods. 行动组

    4. Click the 结束 icon for the Condition or Action Group dialog box to end the configuration.

      Note

      If you want to add more conditions and action groups, click the 条件 icon.

    5. Optional. If you want to add more Condition and Action Group nodes after you click End, perform the following steps:

      1. Delete an existing node.

        Right-click the node and select Delete Node.删除节点

      2. Add a node

        • Click the 条件 icon to add a Condition node.

        • Click the 行动策略 icon to add an Action Group node.

        • Click the 结束 icon to add an End node.行动策略

    6. Click Confirm.

Modify an action policy

  1. Find the action policy that you want to modify and click Edit in the Actions column.

  2. In the Edit Action Policy dialog box, modify the conditions and action groups.

  3. Click Confirm.

Delete an action policy

Before you delete an action policy, make sure that the action policy is not referenced by alert rules. If you delete the action policy that is referenced by an alert rule, an exception will occur during the monitoring of events based on the alert rule.

Note

By default, the built-in alert rules of ActionTrail reference the SLS actiontrail builtin action policy. To prevent alert notification exceptions, do not delete the SLS actiontrail builtin action policy.

  1. Find the action policy that you want to delete and click Delete in the Actions column.

  2. Click Confirm.

References

You can also use Simple Log Service to create action policies. For more information, see Create an action policy.