Create a DingTalk chatbot for alert notifications

更新时间:
复制 MD 格式

When application alerts trigger in Enterprise Distributed Application Service (EDAS), your team needs to respond quickly. A DingTalk chatbot delivers alert notifications directly to a DingTalk group, so your team can see and act on alerts promptly.

With a DingTalk chatbot, you can:

  • Receive alert notifications in a DingTalk group

  • View and respond to alerts directly in the group chat

  • Get daily alert statistics at scheduled times

Prerequisites

Before you begin, make sure that you have:

  • A DingTalk group created on your DingTalk client to receive alert notifications

  • A custom chatbot created in the DingTalk group on your DingTalk client, and the webhook URL of the chatbot. For instructions, see Obtain the webhook URL of a DingTalk chatbot

Step 1: Create the chatbot in the EDAS console

  1. Log on to the EDAS console.

  2. In the left-side navigation pane, choose Application Management > Applications.

  3. In the top navigation bar, select a region. In the upper part of the Applications page, select a microservices namespace from the Microservices Namespace drop-down list, and then click the name of the application.

  4. In the left-side navigation pane, choose Alert Management > Contact.

  5. On the Notification Objects page, click the DingTalk/Lark/WeCom tab.

  6. On the DingTalk/Lark/WeCom tab, click DingTalk.

  7. In the Create DingTalk Chatbot dialog box, configure the following parameters and click OK.

    Parameter

    Description

    Name

    The name of the DingTalk chatbot.

    Signature Key

    The signature key.

    Chatbot Webhook URL

    The webhook URL obtained from the DingTalk chatbot. See Prerequisites.

    Whether the Chatbot Sends Daily Statistics

    Turn on this option to receive daily alert summaries. Specify the times in HH:SS format, separated by commas (,). At each specified time, the chatbot sends a summary that includes the total number of alerts for the day, the number of resolved alerts, and the number of pending alerts.

Step 2: Link the chatbot to a notification policy

To receive alerts through the chatbot, you must connect it to a notification policy. This tells EDAS which alerts to send to your DingTalk group.

  1. Open the notification policy you want to configure. For full instructions, see Create and manage a notification policy.

  2. Set the Notification method parameter to DingTalk.

  3. Save the notification policy.

After you save the policy, alert notifications are sent to the DingTalk group whenever a dispatch rule is triggered.

Manage alerts in a DingTalk group

After an alert notification arrives in a DingTalk group, you can view and respond to the alert directly in the group chat. For more information, see Handle alerts in a group chat.

Manage chatbots

On the DingTalk/Lark/WeCom tab, you can search for, edit, or delete existing chatbots.