You can create an action policy to manage how alert notifications are sent. You can configure an action policy to dynamically send alert notifications to specified users, user groups, or on-duty groups. You can also configure an action policy to escalate an alert that remains unconfirmed or unresolved for a long period of time.
Procedure
Log on to the Log Service console.
Go to the Action Policy tab.
In the Projects section, click the project that you want to manage.
In the left navigation sidebar, click Alerts.
On the Alert Center page, choose .
On the Action Policy tab, click Create.
In the Add Action Policy dialog box, set the ID and Name parameters.
Add a primary action policy.
On the Primary Action Policy tab, click the icon.
Specify a condition to trigger an alert.
Parameter
Description
Condition
All: The specified action policy is executed only if all alerts in a merge set meet the specified condition.
Any: The specified action policy is executed if one or more of the alerts in a merge set meet the specified condition.
Conditional expressions
Alerts that meet a conditional expression are processed based on the specified action policy. You can specify an object, an operator, and an object value for the conditional expression. For example, you can set the object to an Alibaba Cloud account and set the object value to 174****2745.
Mode
You can add multiple conditions in standard mode or advanced mode.
Standard Mode: If you specify multiple conditions, the conditions are associated by using the AND operator.
Advanced Mode: If you specify multiple conditions, you can use the AND operator or the OR operator to associate the conditions. You can also group multiple conditions into one group by using parentheses.
Configure an action group.
Set the parameters displayed in the Simple Log Service console to configure notification methods. For more information, see Notification methods.
NoteIf you set the Notification Method parameter to EventBridge or Function Compute, you must authorize Simple Log Service as prompted. This operation is required only once. During the authorization process, a service-linked role named AliyunServiceRoleForSLSAlert is automatically created. Then, Simple Log Service can assume the service-linked role to access the resources of Alibaba Cloud services such as EventBridge and Function Compute.
Click the icon next to the Condition or Action Group dialog box to end the configuration.
If you want to add more conditions and action groups, click the icon.
Optional:Configure a secondary action policy.
You can configure a secondary action policy to handle an alert that remains unresolved for a long period of time. You can turn on Enabled on the Secondary Action Policy tab and set the parameters. For more information, see Step 5.
Click OK.
What to do next
Delete a node
Right-click the node that you want to delete and select Delete Node.
Add a node
NoteIf you have added the End node, you must delete the End node before you can add nodes such as Condition and Action Group.
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.