Prerequisites, parameters, and usage notes for each SLS alert notification channel, including SMS, voice call, email, DingTalk, Slack, and webhook.
Overview
Action groups support the following notification channels.
-
User: SMS message, voice call, and email
-
Webhook:
-
DingTalk, Enterprise WeChat, Lark, Slack, and universal webhook
Select a preconfigured webhook in the action group. Manage webhooks through webhook integration.
-
DingTalk-Custom and Webhook-Custom
Enter the webhook URL directly in the action group. These methods are kept for backward compatibility. Use webhook integration for new action policies.
-
-
Others: Message Center, EventBridge, and Function Compute
SMS
SLS sends SMS notifications to specified users, user groups, or on-duty groups when an alert fires.
-
Usage notes
SMS notifications are sent from random numbers. Fixed sender numbers are not supported.
-
Prerequisites
-
Parameters
Configure these parameters in the Action Group dialog box (action policy).
Parameter
Description
Notification method
Select SMS Message.
Recipient
Select the recipients (users, user groups, or on-duty groups).
Alert Template
The alert notification content template.
Period
The notification schedule. Notification sending periods.
Voice call
SLS calls specified users, user groups, or on-duty groups when an alert fires.
-
Usage notes
-
Unanswered calls fall back to SMS.
NoteVoice calls come from a dynamic number pool. Disable call-blocking features on your carrier or phone to ensure delivery.
-
-
Prerequisites
-
Parameters
Configure these parameters in the Action Group dialog box (action policy).
Parameter
Description
Notification Method
Select Voice Call.
Recipient
Select the alert recipients, which can be users, user groups, or on-duty groups.
ImportantVoice calls support only Chinese mainland phone numbers (+86). Ensure the user's mobile number is a +86 number.
Alert Template
The alert notification content template.
Period
The notification schedule. Notification Periods.
SLS sends email notifications to specified users, user groups, or on-duty groups when an alert fires.
-
Usage notes
Simple Log Service uses the monitor-sg@monitor.alibabacloud.com email address to send alert notifications. Add this address to your whitelist to prevent these notifications from being blocked.
-
Prerequisites
-
Parameters
Configure these parameters in the Action Group dialog box (action policies).
Parameter
Description
Notification Method
Select Email.
Recipient
The users, user groups, or on-duty groups that will receive the alert notifications.
Alert Template
The alert notification content template.
Period
The notification schedule. Notification sending periods.
DingTalk-Custom
SLS uses a DingTalk chatbot to send alert notifications to a specified DingTalk group when an alert fires. You can also configure the chatbot to notify specified members.
-
Notes
Each DingTalk chatbot can send a maximum of 20 alert notifications per minute.
-
Prerequisites
Complete the following steps to receive alert notifications through DingTalk:
-
to create a chatbot application whose message receiving mode is set to HTTP.
-
Open the DingTalk client, go to a DingTalk group, and click the
icon in the upper-right corner. -
Select .
-
Select the chatbot you created in the first step, click Add, and then click Finish.
-
On the bot management page in the group chat, find the chatbot you created and copy its webhook URL.
-
-
Parameters
Configure these parameters in the Action Group dialog box (action policies).
Parameter
Description
Notification method
Select DingTalk-Custom.
Request URL
The webhook URL generated in your DingTalk group.
Notified contacts
Which members in the DingTalk group to notify. Valid values: None, All, and Specified Members.
If you select Specified Members, you must select the users, user groups, or on-duty groups to notify.
Alert Template
The alert notification content template. SLS sends notifications using the selected template.
NoteDingTalk supports Markdown. DingTalk.
Period
The notification schedule. Notification periods.
Webhook-Custom
SLS sends an alert notification to a specified webhook URL when an alert fires.
-
Usage notes
Webhook requests time out after 5 seconds. If no response is received, the request fails.
-
Prerequisites
You must have a publicly accessible webhook URL.
-
Parameters
Configure these parameters in the Action Group dialog box (action policy).
NoteYour webhook endpoint must return HTTP 200 to acknowledge the request. Otherwise, SLS retries the request.
Parameter
Description
Notification Method
Select WebHook-Custom.
Request URL
The webhook URL. This must be a public address, such as a domain name or a URL in the IP:Port format.
Alert Template
The alert notification content template.
Use a JSON-format template for custom webhooks.
Request method
The HTTP request method. Valid values: GET, POST, DELETE, PUT, and OPTIONS.
Unless you have specific requirements, use POST — it has the best support across web frameworks.
Request Headers
Click Add Request Header to add custom request headers. For example: Content-Type: application/json;charset=utf-8
Period
The notification schedule. Periods for sending alert notifications.
Message Center
SLS sends alert notifications to Message Center contacts when an alert fires.
-
Prerequisites
Configure the following in Alibaba Cloud Message Center before using this notification method.
-
Log on to Alibaba Cloud Message Center.
-
Choose . Click Modify next to Log Service (LOG) Alert.
-
In the Modify Contact dialog box, select contacts and click Save.
After you save the changes, the system automatically sends a verification message to the specified email address. A contact must be verified to receive notifications.
Note-
You must specify at least one contact.
-
The default notification method is email and cannot be changed.
-
-
-
Parameters
Configure these parameters in the Action Group dialog box (action policy).
Parameter
Description
Notification Method
Select Message Center.
Alert Template
The alert notification content template.
Period
The notification schedule. Notification Dispatch Policies.
DingTalk
SLS sends alert notifications to a DingTalk group via a chatbot. You can also configure the chatbot to notify specific members.
-
Usage notes
Each DingTalk chatbot can send a maximum of 20 alert notifications per minute.
-
Prerequisites
A webhook is required. Webhook integration.
-
Parameters
Configure these parameters in the Action Group dialog box (Action Policy).
Parameter
Description
Notification Method
Select DingTalk.
Select Webhook
Select your webhook.
Notified Contacts
Whether to notify specific members in the DingTalk group. Valid values: No Reminder, All, and Specified Members.
If you select Specified Members, you must select the users, user groups, or on-duty groups to notify.
Alert Template
The alert notification content template.
NoteDingTalk supports Markdown. Content format.
Period
The notification schedule. Periods for sending alert notifications.
Enterprise WeChat
SLS sends alert notifications to a specified Enterprise WeChat group via a bot when an alert fires.
-
Prerequisites
A webhook is required. Webhook integration.
-
Parameters
Configure these parameters in the Action Group dialog box (action policy).
Parameter
Description
Notification Method
Select WeCom.
Select Webhook
Select the webhook that you created.
Notified Contacts
Who to notify in the Enterprise WeChat group. Valid values: No Reminder, All, and Specified Members.
If you select Specified Members, you must select the users, user groups, or on-duty groups to notify.
ImportantIf you select All or Specified Members, the notification content can only be in plain text. The Markdown format is not supported.
Alert Template
The alert notification content template.
NoteEnterprise WeChat supports Markdown. Content format.
Sending period
The notification schedule. Periods for sending alert notifications.
Lark
SLS sends alerts to a specified Lark group via a Lark bot.
-
Prerequisites
A webhook is required. Webhook integration.
-
Parameters
Configure these parameters in the Action Group dialog box (Action Policy).
Parameter
Description
Notification Method
Select Lark.
Select Webhook
Select the webhook that you created.
Notified Contacts
Specifies whether to @-mention all members in the Lark group. Valid values: No Reminder and All.
Alert Template
The alert notification content template.
NoteLark supports Markdown. Content format.
Period
The notification schedule. Notification sending period.
Slack
SLS notifies specified Slack users when an alert fires.
-
Prerequisites
A webhook is required. Webhook integration.
-
Parameters
Configure these parameters in the Action Group dialog box (action policy).
Parameter
Description
Notification method
Select Slack.
Select webhook
Select the webhook that you created.
Alert Template
The alert notification content template.
NoteSlack supports Markdown. Content format.
Period
The notification schedule. Periods for sending alert notifications.
Universal Webhook
SLS sends alert notifications to a custom webhook URL when an alert fires.
-
Prerequisites
A webhook is required. Webhook integration.
-
Parameters
Configure these parameters in the Action Group dialog box (action policies).
Parameter
Description
Notification Method
Select Universal Webhook.
Select Webhook
Select the webhook that you created.
Alert Template
Specifies the content of the alert notification.
Period
The notification schedule. Notification schedule.
EventBridge
SLS sends an alert event to an EventBridge event bus when an alert fires.
-
Prerequisites
-
Create a custom event bus in EventBridge. Create a custom event bus.
NoteYou can skip the event source configuration when you create a custom event bus. If you want to add an event source, you must create one named acs.sls.alert. This name must match the value of the source field in the alert event.
-
If you use a RAM user, you must grant the AliyunEventBridgeReadOnlyAccess permission to the RAM user.
-
-
Parameters
Configure these parameters in the action group dialog box (action policy).
Parameter
Description
Notification method
Select EventBridge.
Region
Select the region where you created the event bus.
EventBridge
Select the event bus that you created. Simple Log Service sends alert events to this event bus.
Alert Template
The alert notification content template.
Period
The notification schedule. Notification schedule mechanism.
-
Event fields
When an alert fires, SLS generates a CloudEvents-compliant event and sends it to the event bus. Event overview. The following table describes the event fields.
Important-
If multiple alerts fire, an event is sent per alert. Alert merging is not performed.
-
If the content of the alert template for EventBridge is not in JSON format, you cannot use variables from the data field in the event rule of the event bus after the alert event is sent.
Parameter
Description
id
A globally unique ID for the event.
source
The event source. The value is acs.sls.alert.
specversion
The version of the CloudEvents specification. The current version is 1.0.
type
The event type.
-
For an alert firing status, the event type is sls:AlertEvent:Firing.
-
For a resolved notification status, the event type is sls:AlertEvent:Resolved.
datacontenttype
The content type of the data field. The value is application/json.
subject
The subject of the event. This corresponds to the subject configured in the alert template for EventBridge.
time
The time when the event occurred. This corresponds to the alert_time field in the alert message.
data
The event payload. This corresponds to the content configured in the alert template for EventBridge. The value must be in JSON format.
-
Function Compute (FC)
SLS invokes the specified Function Compute function when an alert fires.
-
Notes
-
Only non-HTTP functions are supported. For HTTP functions, use the Webhook-Custom method.
-
Only functions whose names start with
sls-ops-are supported.
-
-
Prerequisites
-
Create a service and a non-HTTP function in Function Compute. Create a function.
-
If you are using a RAM user, grant the RAM user the AliyunFCReadOnlyAccess permission.
-
-
Parameters
Configure these parameters in the action group dialog box (Action policies).
Parameter
Description
Channel
Select Function Compute.
Region
Select the region where you created your function.
Service
Select the service you created.
Version/alias
Select the version or alias of the service. The default value is LATEST.
Function
Select the function you created. Only functions whose names start with
sls-ops-are supported.Alert Template
Select the template for alert notifications.
Sending interval
The notification schedule. Notification sending periods.