All Products
Search
Document Center

:Configure notification methods

Last Updated:Aug 03, 2023

Simple Log Service allows you to configure one or more alert notification methods. Simple Log Service supports notification methods such as emails, DingTalk, DingTalk chatbot webhooks, custom webhooks, and Alibaba Cloud Message Center. This topic describes how to configure notification methods.

(Recommended) Message Center

If you set the notification method to Notifications, Message Center sends alert notifications to the specified contacts when alerts are triggered in Simple Log Service.

  1. Specify the contacts who receive alert notifications from Message Center.

    1. Log on to the Message Center console.

    2. Choose Message Settings > Common Settings. On the Common Settings page, click Modify next to Simple Log Service Alarm Notification.

      Message Settings
    3. In the Modify Contact dialog box, select the contacts to whom you want to send alert notifications. Then, click Save.

      If you need to add a contact, click + Add Receiver. Then, specify an email address and job position for the contact.

      Note
      • Alibaba Cloud sends a verification email to the email address. The contact can receive alert notifications only after the email address is verified.

      • You must specify at least one contact.

      • The default notification method is Emailand cannot be changed.

  2. Configure a notification method in the Log Service console.

    1. When you Configure an alert rule, select Notifications from the Notifications drop-down list and click Add.

    2. Enter the content of an alert notification.

      The content must be 1 to 500 characters in length. You can customize the content. You can also use template variables in the content. For more information, see Template variables.

    3. Click Submit.

      In this example, only one notification method is configured. If multiple notification methods are required, configure the notification methods before you click Submit.

Email

If you set the notification method to Email, Simple Log Service sends alert notification emails to the specified email addresses.

Note

Simple Log Service sends alert notification emails by using the monitor-sg@monitor.alibabacloud.com email address. You can add this email address to the email whitelist to prevent email notifications from being blocked.

  1. When you Configure an alert rule, select Email from the Notifications drop-down list and click Add.

  2. Set the required parameters. The following table describes the parameters.

    Parameter

    Description

    Recipients

    The email addresses to which you want to send the alert notification. Separate multiple email addresses with commas (,).

    Subject

    The subject of the alert notification email. The subject must be 1 to 100 characters in length. You can customize the subject. You can also use template variables in the subject. For more information, see Template variables.

    Content

    The content of the alert notification email. The content must be 1 to 500 characters in length. You can use template variables in the content. For more information, see Template variables.

  3. Click Submit.

    In this example, only one notification method is configured. If multiple notification methods are required, configure the notification methods before you click Submit.

DingTalk chatbot webhooks

If you set the notification method to Webhook-DingTalk Bot, Simple Log Service sends alert notifications by using a DingTalk chatbot to the DingTalk group to which a specified webhook URL points. The chatbot can also remind the specified contacts of the alert notifications.

Note

Each DingTalk chatbot can send up to 20 alert notifications per minute.

  1. Create a DingTalk chatbot.

    1. Open DingTalk and go to a DingTalk group.

    2. In the upper-right corner of the chat window, click the Group Settings icon and choose Group Assistant > Add Robot.

    3. In the ChatBot dialog box, click the + icon in the Add Robot section.

    4. In the Robot details dialog box, select Custom (Custom message services via Webhook) and click Add.

    5. In the Add Robot dialog box, enter a chatbot name in the Chatbot name field and select security options in the Security Settings section based on your business requirements. Then, select the I have read and accepted DingTalk Custom Robot Service Terms of Service check box and click Finished.

      Note

      We recommend that you set the Security Settings parameter to Custom Keywords. You can set up to 10 keywords. The chatbot sends only messages that contain at least one of the specified keywords. We recommend that you specify Alert as a keyword.

    6. Click Copy to copy the webhook URL.

  2. Configure a notification method in the Simple Log Service console.

    1. When you Configure an alert rule, select WebHook-DingTalk Bot from the Notifications drop-down list and click Add.

    2. Set the required parameters. The following table describes the parameters.

      Parameter

      Description

      Request URL

      The webhook URL of the DingTalk chatbot. Paste the webhook URL that you copied in Step 1.

      Title

      The title of the alert notification. You can customize the title. You can also use template variables in the title. For more information, see Template variables. The title must be 1 to 100 characters in length.

      Recipients

      The group members whom you want to remind of the alert notification. Valid values: None, All, and Specified Members. If you select Specified Members, enter the mobile phone numbers of the group members in the Tagged List field. Separate multiple mobile phone numbers with commas (,).

      Content

      The content of the alert notification. The content must be 1 to 500 characters in length. You can use the default content. You can customize the content. You can also use template variables in the content. For more information, see Template variables.

      Note

      If you want to remind a group member of the alert notification, use the @<Mobile phone number of the group member> syntax in the Content field.

    3. Click Submit.

      In this example, only one notification method is configured. If multiple notification methods are required, configure the notification methods before you click Submit.

Custom webhooks

If you set the notification method to WebHook-Custom, Simple Log Service sends alert notifications to a specified webhook URL.

Note

If Simple Log Service receives no response within 5 seconds after a notification is sent, the request times out.

  1. When you Configure an alert rule, select WebHook-Custom from the Notifications drop-down list and click Add.

  2. Set the required parameters. The following table describes the parameters.

    Parameter

    Description

    Request URL

    The custom webhook URL. The webhook URL must be an Internet domain name.

    Request Method

    The method that is used to send the notification. Request methods that are supported include GET, POST, DELETE, PUT, and OPTIONS. The default request header is Content-Type: application/json;charset=utf-8.

    If you need to add request headers, click Add Request Headers.

    Content

    The content of the alert notification. The content must be 1 to 500 characters in length. You can use the default content. You can customize the content. You can also use template variables in the content. For more information, see Template variables.

  3. Click Submit.

    In this example, only one notification method is configured. If multiple notification methods are required, configure the notification methods before you click Submit.