All Products
Search
Document Center

Simple Log Service:Create a webhook

Last Updated:Apr 09, 2024

Simple Log Service allows you to manage webhooks on the Webhook Integration page. You can select an existing webhook when you configure an action policy. Simple Log Service supports DingTalk webhooks, WeCom webhooks, Lark webhooks, Slack webhooks, and universal webhooks.

Procedure

  1. Log on to the Simple Log Service console.

  2. Go to the Webhook Integration tab.

    1. In the Projects section, click a project.

    2. In the left-side navigation pane, click Alerts.

    3. On the Alert Center page, choose Notification Objects > Webhook Integration.

  3. Create a webhook.

    1. On the Webhook Integration tab, click Create.

    2. In the Create Webhook dialog box, configure the following parameters and click OK.

      Parameter

      Description

      ID

      The ID of the webhook. The ID must be unique within an Alibaba Cloud account.

      Name

      The name of the webhook.

      Type

      The type of the webhook. Valid values:

      • DingTalk

      • WeCom

      • Lark

      • Slack

      • Universal Webhook

      Request Method

      The request method that is used to call the webhook. This parameter is required only if you set Type to Universal Webhook. If you set Type to a different value, the POST method is used by default.

      Request URL

      The URL of the webhook.

      You must complete the webhook configurations based on the webhook type that you select to obtain the webhook URL.

      • DingTalk

        Create a custom chatbot on DingTalk to obtain the webhook URL.

      • WeCom

        Create a custom chatbot on WeCom to obtain the webhook URL.

      • Lark

        Create a custom bot on Lark to obtain the webhook URL. For more information, see Use bots in groups.

      • Slack

        Create a webhook on Slack to obtain the webhook URL. For more information, see Sending messages using Incoming Webhooks.

      Signing Key

      The signing key of the webhook.

      This parameter is required only if you set Type to DingTalk or Lark. The signing key is required when you configure signatures as the security verification method on DingTalk or Lark. To obtain a signing key, perform the following operations:

      • DingTalk: Configure a signing method in the custom chatbot settings of DingTalk, and then obtain a signing key for the webhook.

      • Lark: Configure a signing method in the custom bot settings of Lark, and then obtain a signing key for the webhook.

      Headers

      The custom headers that are used to call the webhook.

      This parameter is required only if you set Type to Universal Webhook.

Webhook security settings

To reduce the potential risks caused by the leakage of the webhook URL, DingTalk chatbots and Lark bots provide the following security configuration methods. Simple Log Service allows you to select one method based on your needs.

  • Custom keyword

    You can specify a maximum of 10 keywords. An alert notification is sent only if it contains at least one of the specified keywords. We recommend that you configure the alert keyword on DingTalk or Lark.

  • Signature

    You can validate the source of a request by using a signature. We recommend that you generate a signing key on DingTalk or Lark and then add the key to the webhook settings of Simple Log Service.

  • IP address (CIDR block)

    You can configure a maximum of 10 IP addresses or CIDR blocks. Only requests that are sent from the specified IP addresses or CIDR blocks are processed. You must add the IP addresses 120.76.47.88 and 119.23.150.175 to the whitelist of DingTalk or Lark.

What to do next

After you create the webhook, you can use the webhook in an action policy to send alert notifications. For more information, see Create an action policy.