Manage an action policy

更新时间:
复制 MD 格式

Action policies control the sending method, frequency, and recipients of alert notifications, ensuring that users are notified of exceptions promptly.

Create an action policy

The built-in alert rules of ActionTrail reference the SLS actiontrail builtin action policy by default. 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 Event Alerting.

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

  4. Click Create.

  5. In the Add Action Policy dialog box, enter an ID and a Name.

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

    1. Click the 条件 icon.

    2. Configure the conditions for triggering alerts, and then click Confirm.

      Parameter

      Description

      Example

      Condition

      Valid values:

      • All: The system runs the action group only if every alert in the set meets all conditions.

      • Any: The system runs the action group if at least one alert in the set meets all conditions.

      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: All conditions are joined by the AND operator.

      • Advanced Mode: Conditions can be joined by AND or OR operators. You can use parentheses to group conditions and create nested logic.

      Standard Mode

    3. Configure an action group.

      Configure the notification method and its parameters. Supported notification methods include SMS, voice call, email, DingTalk, webhook, and Message Center. For more information, see notification methods. In the Action Group section, set Channel to Widget and Recipient Type to Default Recipient. Select a Recipient and a Content Template, and set Send Time to Any Time. To add more notification methods, click + Add Channel Tracking.

    4. Click the 结束 icon in the Condition or Action Group dialog box to complete the Primary Action Policy configuration.

      Note

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

    5. (Optional) If you need to add a Condition node or Action Group node after you have added an End node, follow these steps:

      1. Delete a node: Hover over the target node, right-click, and then click 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 Modify 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 it is not referenced by any alert rules. Deleting a referenced action policy causes exceptions in event monitoring for the associated alert rules.

Note

The built-in alert rules of ActionTrail reference the SLS actiontrail builtin action policy by default. Do not delete this policy to avoid alert notification exceptions.

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

  2. Click Confirm.

References

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