All Products
Search
Document Center

Simple Log Service:Quickly set up log alerts

Last Updated:Mar 25, 2026

After you collect logs to a Logstore, you can add an alert rule to monitor them. This topic uses a DingTalk notification example to demonstrate how to set up log alerts.

Procedure

This example shows how to send alert notifications to a DingTalk group. After logs are collected to a Logstore, an alert rule checks the Logstore for data every 15 minutes. If data exists, an alert is triggered, and a DingTalk chatbot sends a notification. The process involves these steps:

image
  1. Configure a notification recipient: Create a user named Bob and add this user to a user group.

  2. Configure an alert rule: Set up a rule to check the target Logstore for data every 15 minutes. An alert is triggered if data exists.

  3. Configure a notification policy: Use the SLS built-in alert template to send a notification to a DingTalk group and notify Bob.

Before you begin

Before you create an alert, make sure that logs are successfully collected to your Logstore.
  1. Log on to the Simple Log Service console.

  2. In the Projects section, click the one you want.

    image

  3. Click the image icon, select the target Logstore from the list, and then click Search & Analyze to confirm you can view your logs.

    image

1. Configure notification recipients

You use users and user groups to specify notification recipients for alerts.

1.1 Create a user

In the left-side navigation pane, click Alerts. On the Alert Center page, create a user named Bob as shown in the following figure, and then click OK.

image

1.2 Create a user group

As shown in the following figure, add the user Bob to the test user group in the Add User Group dialog box, and then click OK.

image

2. Configure an alert rule

Alert rules monitor your log data. In this example, you configure an alert rule to check a target Logstore for data every 15 minutes. If data is found, a notification is sent to a DingTalk group.

2.1 Add query statistics

  1. In the Alert Center, click the Alert Rules tab, and then click Create Alert.

    image

  2. In the Create Alert panel, configure the Query Statistics section and click Add.

    image

  3. In the Query Statistics dialog box, select the target Logstore, click Preview to view the data, and click OK.

    image

2.2 Configure the trigger condition

In the Create Alert panel, set Trigger Condition to Data is returned and Severity to Medium. Then, click OK.

image

3. Configure a notification policy

3.1 Configure an alert template

Simple Log Service uses an alert template to define the content of notifications. For example, you can use the SLS built-in alert template to send alerts through DingTalk.
  1. In the Alert Center, navigate to Notification Policies > Alert Templates. Find the SLS built-in alert template and click Edit in the Actions column.

    image

  2. Configure the Content for DingTalk alerts, as shown in the following figure.

    image

3.2 Configure SLS notification

Simple Log Service sends alerts to the Destination you select. For example, you can use SLS Notification to configure the DingTalk channel.
  1. Prerequisites

    To send alert notifications by using DingTalk, you must first create and configure a chatbot:

    • .

    • Open the DingTalk client, go to the DingTalk group, and click the settings icon in the upper-right corner.

    • Choose Bot > Add Robot.

    • Select Custom (Custom message services via Webhook), click Add, and configure the chatbot: set a Chatbot name, for Security Settings, select Custom Keywords, enter alert, and then click Finished.

    • On the chatbot management page in the group chat, find the chatbot that you created and copy its webhook URL.

  2. Create a webhook

    In the Create Webhook dialog box, paste the copied webhook URL into the Request URL field. Configure the other parameters as shown in the following figure, and then click OK.

    image

  3. Configure the notification channel

    On the Alert Rules tab, find the target rule and click Edit.

    image

    In the Edit Alert panel, configure the parameters as shown in the following figure, and then click OK.

    image

View alert trigger records

View the alert dashboards

Go to Alert Center > Alert Dashboards > Alert Rule Center to view the alert trigger count.

image

View notification details

  1. On the Alert Rules > Alert Center, click the target rule.

    image

  2. You can view the detailed alert information. The alert was triggered successfully if Trigger Alert is true.

    image

Related topics