This topic describes the usage notes, prerequisites, and parameters for each notification method.
Background information
When you create an action group, you can select the following methods to send alert notifications:
User: SMS Message, Voice Call, and Email
Webhook:
DingTalk, Enterprise WeChat, Lark, Slack, and Universal Webhook
You can select a webhook that you created for the action group. You can manage webhooks on the Webhook Integration tab. For more information, see Create a webhook.
DingTalk-Custom and Webhook-Custom
You must enter information such as a webhook URL for the action group. The two methods are reserved to ensure compatibility with historical configurations. We recommend that you select a webhook available on the Webhook Integration tab when you create an action policy.
Others: Message Center, EventBridge, and Function Compute
SMS Message
If you select SMS Message for Notification Method, Simple Log Service sends alert notifications to specified users, user groups, or on-duty groups by using text messages after alerts are triggered.
Usage notes
If you select SMS Message, alert notifications are sent from random numbers. Fixed numbers cannot be provided.
Prerequisites
Users, user groups, or on-duty groups are created. For more information, see Create users and user groups and Create an on-duty group.
Parameters
If you want Simple Log Service to send alert notifications by using text messages, you must configure the following parameters in the Action Group dialog box. For more information, see Create an action policy.
Parameter
Description
Notification Method
Select SMS Message.
Recipient
Select users, user groups, or on-duty groups to which alert notifications are sent.
Alert Template
Select an alert template, which determines the content of an alert notification. Simple Log Service sends alert notifications based on the selected alert template.
Period
Select a period during which Simple Log Service can send alert notifications. For more information, see Periods for sending alert notifications.
Voice Call
If you select Voice Call for Notification Method, Simple Log Service sends alert notifications to specified users, user groups, or on-duty groups by using voice calls after alerts are triggered.
Usage notes
If a call to a mobile phone number is not answered, Simple Log Service sends a text message to the number.
Simple Log Service uses the following numbers to make voice calls. To prevent these numbers from being blocked, we recommend that you add the following numbers to the whitelist of your mobile phone:
057126885887, 057126885890, 057126885891, 057126885892, 057126885893, 057126885895, 057126885897, 057126885901, 057126885902, 057126885905, 057126885907, 057126885910, 057126885923, 057100000268, 057100000425, 057100000426, 057126886776, 057126886767, 057126886644, 057126886464, 057128354209, 057128354029, 057100001824, 057128357746, 057128357749, 02162510523, 02162569018, 02152362232, 02152765115, 02152927208, 02062766635, 02062766652, 02062766651, 02062766650, 05923396667, 05923396515, 05923396622, 05923396548, and 05923396629
Prerequisites
Users, user groups, or on-duty groups are created. For more information, see Create users and user groups and Create an on-duty group.
Parameters
If you want Simple Log Service to send alert notifications by using voice calls, you must configure the following parameters in the Action Group dialog box. For more information, see Create an action policy.
Parameter
Description
Notification Method
Select Voice Call.
Recipient
Select users, user groups, or on-duty groups to which alert notifications are sent.
ImportantThe voice call notification method supports only mobile phone numbers in the Chinese mainland, which are prefixed with 86. Make sure that you select users whose mobile phone numbers are prefixed with 86. You can specify a mobile phone number when you create a user.
Alert Template
Select an alert template, which determines the content of an alert notification. Simple Log Service sends alert notifications based on the selected alert template.
Period
Select a period during which Simple Log Service can send alert notifications. For more information, see Periods for sending alert notifications.
If you select Email for Notification Method, Simple Log Service sends alert notifications to specified users, user groups, or on-duty groups by using emails after alerts are triggered.
Usage notes
Simple Log Service sends alert notifications by using the monitor-sg@monitor.alibabacloud.com email address. To prevent the emails from this address from being blocked, we recommend that you add this address to the whitelist of your email address.
Prerequisites
Users, user groups, or on-duty groups are created. For more information, see Create users and user groups and Create an on-duty group.
Parameters
If you want Simple Log Service to send alert notifications by using emails, you must configure the following parameters in the Action Group dialog box. For more information, see Create an action policy.
Parameter
Description
Notification Method
Select Email.
Recipient
Select users, user groups, or on-duty groups to which alert notifications are sent.
Alert Template
Select an alert template, which determines the content of an alert notification. Simple Log Service sends alert notifications based on the selected alert template.
Period
Select a period during which Simple Log Service can send alert notifications. For more information, see Periods for sending alert notifications.
DingTalk-Custom
If you select DingTalk-Custom for Notification Method, Simple Log Service sends alert notifications to a specified DingTalk group by using a DingTalk chatbot after alerts are triggered. The chatbot can also remind specified members in the group of the alert notifications.
Usage notes
Each DingTalk chatbot can send a maximum of 20 alert notifications every minute.
Prerequisites
Before you can use DingTalk to receive alert notifications, the following configurations are complete:
Create a DingTalk chatbot and set the Consumption Mode parameter of the chatbot to HTTP.
Open DingTalk. Go to a DingTalk group and click the icon in the upper-right corner.
Choose
.Select the chatbot that you created in Step 1 and click Add. Then, click Complete.
In the Robot Management panel, view the chatbot and copy the webhook URL of the chatbot.
Parameters
If you want Simple Log Service to send alert notifications by using the DingTalk-Custom method, you must configure the following parameters in the Action Group dialog box. For more information, see Create an action policy.
Parameter
Description
Notification Method
Select DingTalk-Custom.
Request URL
Enter the webhook URL that is generated in the DingTalk group.
Notified Contacts
Determine whether to remind specified members in the group of alert notifications. Valid values: No Reminder, All, and Specified Members.
If you select Specified Members, you must specify users, user groups, or on-duty groups.
Alert Template
Select an alert template, which determines the content of an alert notification. Simple Log Service sends alert notifications based on the selected alert template.
NoteDingTalk supports the Markdown syntax. For more information, see DingTalk.
Period
Select a period during which Simple Log Service can send alert notifications. For more information, see Periods for sending alert notifications.
Webhook-Custom
If you select Webhook-Custom for Notification Method, Simple Log Service sends alert notifications to a custom webhook URL after alerts are triggered.
Usage notes
The timeout period of a webhook is 5 seconds. If the HTTP status code 200 is not returned within 5 seconds after a request is sent to invoke a webhook, the request fails.
Prerequisites
A webhook URL is obtained.
Parameters
If you want Simple Log Service to send alert notifications by using the Webhook-Custom method, you must configure the following parameters in the Action Group dialog box. For more information, see Create an action policy.
NoteIf a webhook is successfully invoked, the HTTP status code 200 is returned. If the HTTP status code 200 is not returned, Simple Log Service considers that the request fails. In this case, the webhook is invoked again.
Parameter
Description
Notification Method
Select Webhook-Custom.
Request URL
Enter a custom webhook URL, which must be accessible over the Internet. For example, you can enter a public domain name or a URL that includes a string in the IP:Port format.
Alert Template
Select an alert template, which determines the content of an alert notification. Simple Log Service sends alert notifications based on the selected alert template.
If you select Webhook-Custom, we recommend that you select an alert template whose content is in the JSON format.
RequestMode
Select a request method. Valid values: GET, POST, DELETE, PUT, and OPTIONS.
If you have no special requirements, we recommend that you select the POST method because this method is best supported among web frameworks.
Request Header
Add a request header. You must click Add Request Header to add a request header. Example: Content-Type: application/json;charset=utf-8.
Period
Select a period during which Simple Log Service can send alert notifications. For more information, see Periods for sending alert notifications.
Message Center
If you select Message Center for Notification Method, Simple Log Service sends alert notifications to specified recipients by using internal messages after alerts are triggered.
Prerequisites
Before Simple Log Service can send alert notifications by using Message Center, you must complete the following configurations in Alibaba Cloud Message Center:
Log on to the Message Center console.
Choose
. On the page that appears, click Modify next to Simple Log Service Alarm Notification.In the Modify Contact dialog box, select the contacts to which you want Simple Log Service to send alert notifications. Then, click Save.
Only the owner of an Alibaba Cloud account can add contacts. After you add a contact, Alibaba Cloud sends verification information to the specified email address. The contact can receive alert notifications only after the email address is verified.
NoteYou must select at least one contact.
The default notification method is Email and cannot be changed.
Parameters
If you want Simple Log Service to send alert notifications by using Message Center, you must configure the following parameters in the Action Group dialog box. For more information, see Create an action policy.
Parameter
Description
Notification Method
Select Message Center.
Alert Template
Select an alert template, which determines the content of an alert notification. Simple Log Service sends alert notifications based on the selected alert template.
Period
Select a period during which Simple Log Service can send alert notifications. For more information, see Periods for sending alert notifications.
DingTalk
If you select DingTalk for Notification Method, Simple Log Service sends alert notifications to a specified DingTalk group by using a DingTalk chatbot after alerts are triggered. The chatbot can also remind specified members in the group of the alert notifications.
Usage notes
Each DingTalk chatbot can send a maximum of 20 alert notifications every minute.
Prerequisites
A webhook is created. For more information, see Create a webhook.
Parameters
If you want Simple Log Service to send alert notifications by using DingTalk, you must configure the following parameters in the Action Group dialog box. For more information, see Create an action policy.
Parameter
Description
Notification Method
Select DingTalk.
Select Webhook
Select the webhook that you created.
Notified Contacts
Determine whether to remind specified members in the group of alert notifications. Valid values: No Reminder, All, and Specified Members.
If you select Specified Members, you must specify users, user groups, or on-duty groups.
Alert Template
Select an alert template, which determines the content of an alert notification. Simple Log Service sends alert notifications based on the selected alert template.
NoteDingTalk supports the Markdown syntax. For more information, see Content formatting.
Period
Select a period during which Simple Log Service can send alert notifications. For more information, see Periods for sending alert notification.
Enterprise WeChat
If you select Enterprise WeChat for Notification Method, Simple Log Service sends alert notifications to a specified Enterprise WeChat group by using an Enterprise WeChat robot after alerts are triggered.
Prerequisites
A webhook is created. For more information, see Create a webhook.
Parameters
If you want Simple Log Service to send alert notifications by using Enterprise WeChat, you must configure the following parameters in the Action Group dialog box. For more information, see Create an action policy.
Parameter
Description
Notification Method
Select Enterprise WeChat.
Select Webhook
Select the webhook that you created.
Notified Contacts
Determine whether to remind specified members in the group of alert notifications. Valid values: No Reminder, All, and Specified Members.
If you select Specified Members, you must specify users, user groups, or on-duty groups.
ImportantIf you select All or Specified Members, Enterprise WeChat supports only plain text in alert notifications, instead of the Markdown syntax.
Alert Template
Select an alert template, which determines the content of an alert notification. Simple Log Service sends alert notifications based on the selected alert template.
NoteEnterprise WeChat supports the Markdown syntax. For more information, see Content formatting.
Period
Select a period during which Simple Log Service can send alert notifications. For more information, see Periods for sending alert notifications.
Lark
If you select Lark for Notification Method, Simple Log Service sends alert notifications to a specified Lark group by using a Lark robot after alerts are triggered.
Prerequisites
A webhook is created. For more information, see Create a webhook.
Parameters
If you want Simple Log Service to send alert notifications by using Lark, you must configure the following parameters in the Action Group dialog box. For more information, see Create an action policy.
Parameter
Description
Notification Method
Select Lark.
Select Webhook
Select the webhook that you created.
Notified Contacts
Determine whether to remind specified members in the group of alert notifications. Valid values: No Reminder and All.
Alert Template
Select an alert template, which determines the content of an alert notification. Simple Log Service sends alert notifications based on the selected alert template.
NoteLark supports the Markdown syntax. For more information, see Content formatting.
Period
Select a period during which Simple Log Service can send alert notifications. For more information, see Periods for sending alert notifications.
Slack
If you select Slack for Notification Method, Simple Log Service sends alert notifications to specified Slack users after alerts are triggered.
Prerequisites
A webhook is created. For more information, see Create a webhook.
Parameters
If you want Simple Log Service to send alert notifications by using Slack, you must configure the following parameters in the Action Group dialog box. For more information, see Create an action policy.
Parameter
Description
Notification Method
Select Slack.
Select Webhook
Select the webhook that you created.
Alert Template
Select an alert template, which determines the content of an alert notification. Simple Log Service sends alert notifications based on the selected alert template.
NoteSlack supports the Markdown syntax. For more information, see Content formatting.
Period
Select a period during which Simple Log Service can send alert notifications. For more information, see Periods for sending alert notifications.
Universal Webhook
If you select Universal Webhook for Notification Method, Simple Log Service sends alert notifications to a custom webhook URL after alerts are triggered.
Prerequisites
A webhook is created. For more information, see Create a webhook.
Parameters
If you want Simple Log Service to send alert notifications by using universal webhooks, you must configure the following parameters in the Action Group dialog box. For more information, see Create an action policy.
Parameter
Description
Notification Method
Select Universal Webhook.
Select Webhook
Select the webhook that you created.
Alert Template
Select an alert template, which determines the content of an alert notification. Simple Log Service sends alert notifications based on the selected alert template.
Period
Select a period during which Simple Log Service can send alert notifications. For more information, see Periods for sending alert notifications.
EventBridge
If you select EventBridge for Notification Method, Simple Log Service sends alert events to a custom event bus after alerts are triggered.
Prerequisites
A custom event bus is created in Alibaba Cloud EventBridge. For more information, see Create a custom event bus.
NoteYou can create a custom event bus without configuring the event source. If you want to configure the event source, you must create an event source named acs.sls.alert. The name is the same as the value of the source field in the alert events.
If you use a RAM user, the RAM user is granted the permissions specified by the AliyunEventBridgeReadOnlyAccess policy.
Parameters
If you want Simple Log Service to send alert notifications by using EventBridge, you must configure the following parameters in the Action Group dialog box. For more information, see Create an action policy.
Parameter
Description
Notification Method
Select EventBridge.
Region
Select the region of the event bus that you created.
Event Bus
Select the event bus that you created. Simple Log Service sends alert events to the event bus.
Alert Template
Select an alert template, which determines the content of an alert notification. Simple Log Service sends alert notifications based on the selected alert template.
Period
Select a period during which Simple Log Service can send alert notifications. For more information, see Periods for sending alert notifications.
Event fields
After an alert is triggered, Simple Log Service generates an alert event and sends the alert event to a specified event bus. For more information, see Overview. The following table describes the fields of an alert event that is generated by Simple Log Service.
ImportantIf multiple alerts are triggered, Simple Log Service generates an alert event for each alert. The alerts are not merged.
If the content of the alert template that is used for EventBridge is not in the JSON format, the variables in the data field cannot be used for the event rule of the event bus after an alert event is sent.
Field
Description
id
The ID of the event. The ID is globally unique.
source
The event source. The value is fixed as acs.sls.alert.
specversion
The version of the CloudEvents specification. The current version is 1.0.
type
The event type.
If the status of the alert is firing, the value of the type field is sls:AlertEvent:Firing.
If the status of the alert is resolved, the value of the type field is sls:AlertEvent:Resolved.
datacontenttype
The content type of the data field. The value is fixed as application/json.
subject
The subject of the event. The subject field corresponds to the subject of the alert template that is used for EventBridge.
time
The time when the event occurred. The time field corresponds to the alert_time field in the alert message.
data
The content of the event. The data field corresponds to the content of the alert template that is used for EventBridge. The value of the data field must be in the JSON format.
Function Compute
If you select Function Compute for Notification Method, Simple Log Service invokes the function that you created after alerts are triggered.
Usage notes
Only non-HTTP functions are supported. If you use HTTP functions, we recommend that you select Webhook-Custom for Notification Method.
Only the functions whose names start with sls-ops- are supported.
Prerequisites
A service and a non-HTTP function are created in Function Compute. For more information, see Quickly create a function.
If you use a RAM user, the RAM user is granted the permissions specified by the AliyunFCReadOnlyAccess policy.
Parameters
If you want Simple Log Service to send alert notifications by using Function Compute, you must configure the following parameters in the Action Group dialog box. For more information, see Create an action policy.
Parameter
Description
Notification Method
Select Function Compute.
Region
Select the region of the function that you created.
Service
Select the service that you created.
Version/Alias
Select the version or alias of the service. Default value: LATEST.
Function
Select the function that you created. Only the functions whose names start with sls-ops- are supported.
Alert Template
Select an alert template, which determines the content of an alert notification. Simple Log Service sends alert notifications based on the selected alert template.
Period
Select a period during which Simple Log Service can send alert notifications. For more information, see Periods for sending alert notifications.