Simple Log Service sends alert notifications based on alert templates.
Procedure
Log on to the Simple Log Service console.
Go to the Alert Template tab.
In the Projects section, click a project.
In the left-side navigation pane, click Alerts.
On the Alert Center page, choose .
-
On the Alert Template tab, click Create.
-
In the Add Alert Template dialog box, configure the following parameters and click OK.
An alert template supports these notification methods: SMS, Voice, Email, DingTalk, WebHook-Custom, Notifications, WeCom, Lark, and Slack.
Parameter
Description
ID
The alert template ID. Must be unique within your Alibaba Cloud account.
Name
The name of the alert template.
SMS
You can configure the following parameters:
-
Language: The notification language. Supported: Chinese and English.
-
Send Content: The notification content. Supports template variables. Description of template variables (New Version).
Voice
You can configure the following parameters:
-
Language: The notification language. Supported: Chinese (recommended) and English.
-
Send Content: The notification content. Supports template variables. Description of template variables (New Version).
Email
You can configure the following parameters:
-
Language: The notification language. Supported: Chinese and English.
-
Subject: The notification subject. Supports template variables.
-
Send Content: The notification content. Supports template variables. Description of template variables (New Version).
DingTalk
You can configure the following parameters:
-
Title: The notification title. Supports template variables.
-
Send Content: The notification content. Supports template variables. Description of template variables (New Version).
Webhook-Custom
You can configure the following parameters:
-
Sending Mode: Supported modes: Single and Batch.
For example, you enter
{ "project": "{{project}}", "alert_name": "{{alert_name}}"}in the Content field, and two alerts are triggered.-
Single: Each alert is sent separately. The content is
{ "project": "project-1", "alert_name": "alert-1"}and{ "project": "project-2", "alert_name": "alert-2"}. -
Batch: Alerts are sent in a single batch. The content is
[{ "project": "project-1", "alert_name": "alert-1"}, { "project": "project-2", "alert_name": "alert-2"}].-
In Batch mode, if you set Maximum number of items sent in a group to N, only the first N alerts in a merge set are sent.
-
In Batch mode, parsable JSON content is sent in JSON format. Otherwise, it is sent as a string array.
-
-
-
Send Content: The notification content. Supports template variables. Description of template variables (New Version).
NoteThe default request header is Content-Type: application/json;charset=utf-8. To use a different format, specify a custom request header in the notification channel. Webhook-Custom.
Notifications
You can configure the following parameters:
-
Language: The notification language. Supported: Chinese and English.
-
Send Content: The notification content. Supports template variables. Description of template variables (New Version).
WeCom
You can configure the following parameters:
-
Title: The notification title. Supports template variables.
-
Send Content: The notification content. Supports template variables. Description of template variables (New Version).
Lark
You can configure the following parameters:
-
Title: The notification title. Supports template variables.
-
Send Content: The notification content. Supports template variables. Description of template variables (New Version).
Slack
You can configure the following parameters:
-
Title: The notification title. Supports template variables.
-
Send Content: The notification content. Supports template variables. Description of template variables (New Version).
EventBridge
You can configure the following parameters:
-
Subject: The notification subject. Supports template variables.
-
Send Content: The notification content. Supports template variables. Description of template variables (New Version).
Function Compute
You can configure the following parameters:
-
Sending Mode: Supported modes: Single and Batch.
For example, you enter
{ "project": "{{project}}", "alert_name": "{{alert_name}}"}in the Content field, and two alerts are triggered.-
Single: Each alert is sent separately. The content is
{ "project": "project-1", "alert_name": "alert-1"}and{ "project": "project-2", "alert_name": "alert-2"}. -
Batch: Alerts are sent in a single batch. The content is
[{ "project": "project-1", "alert_name": "alert-1"}, { "project": "project-2", "alert_name": "alert-2"}].-
In Batch mode, if you set Maximum number of items sent in a group to N, only the first N alerts in a merge set are sent.
-
In Batch mode, parsable JSON content is sent in JSON format. Otherwise, it is sent as a string array.
-
-
-
Send Content: The notification content. Supports template variables. Description of template variables (New Version).
-