After you configure a DingTalk chatbot to send alert notifications, you can specify DingTalk groups to receive alert notifications. This topic describes how to configure a DingTalk chatbot to send alert notifications.

Note ARMS no longer supports the alert feature of the old version. You can use the new alert management feature to create DingTalk chatbots. For more information, see DingTalk chatbots.

Add a custom DingTalk chatbot and obtain the webhook URL

Perform the following steps to add a custom DingTalk chatbot and obtain the webhook URL:

  1. Run the DingTalk client on a PC, go to the DingTalk group to which you want to add an alert chatbot, and then click the Group Settings icon in the upper-right corner.
  2. In the Group Settings panel, click Group Assistant.
  3. In the Group Assistant panel, click Add Robot.
  4. In the ChatBot dialog box, click the + icon in the Add Robot card. Then, click Custom. Add Robot
  5. In the Robot details dialog box, click Add.
  6. In the Add Robot dialog box, edit the profile picture, enter a chatbot name, and then select at least one of the options in the Security Settings section. Read the DingTalk Custom Robot Service Terms of Service and select I have read and accepted DingTalk Custom Robot Service Terms of Service. Click Finished.
    Add Robot
  7. In the Add Robot dialog box, click Copy to save the webhook URL of the chatbot and then click Finished. Add Robot

Create a contact

You can create a contact or add the webhook URL to the existing contact information. In this example, a contact is created.

  1. Log on to the ARMS console.
  2. In the left-side navigation pane, choose Alerts > Contacts.
  3. On the Contacts tab, click Create Contact in the upper-right corner.
  4. In the Create Contact dialog box, enter the webhook URL obtained in Add a custom DingTalk chatbot and obtain the webhook URL. Then, click OK.

Create a contact group

You must create a contact group, because notifications for alerts triggered by an alert rule can be sent to alert contact groups instead of alert contacts.

  1. Log on to the ARMS console.
  2. In the left-side navigation pane, choose Alerts > Contacts.
  3. On the Contact Groups tab, click New Contact Group in the upper-right corner.
  4. In the Create Contact Group dialog box, enter a name in the Group Name field, search for the contact created in Create a contact, add the contact to the Contact Members list, and then click OK.

Create an alert rule

If no alert rule is created, create an alert rule first. You can configure DingTalk chatbots to send alert notifications for Browser Monitoring, Application Monitoring, and Prometheus Service. In this example, an Application Monitoring alert rule is created.

  1. Log on to the ARMS console.
  2. In the left-side navigation pane, choose Alerts > Alert Policies.
  3. On the Alarm Policies page, click Create Alarm in the upper-right corner.
  4. In the Create Alarm dialog box, set the parameters and click Save.
    1. Enter a name in the Alarm Name field. For example, you can enter Alert on JVM-GC times in period-over-period comparison.
    2. From the Application Site drop-down list, select an application.
    3. From the Type drop-down list, select the type of metric that you want to monitor. For example, you can select JVM_Monitoring.
    4. Set the Dimension parameter to Traverse.
    5. Set an alert rule.
      1. Select Meet All of the Following Criteria for the Alarm Rules parameter.
      2. Edit the alert rule. For example, an alert is triggered when the value of N is 5 and the average value of JVM_FullGC increases by 100% compared with that in the previous hour.
        Note To add another alert rule, click the + icon next to Last N Minutes.
    6. Select Ding Ding Robot for the Notification Mode parameter.
    7. In the Notification Receiver section, add the contact group created in Create a contact group to the receiver list. In the Contact Groups list, click the name of the contact group. If the contact group appears in the Selected Groups list, the setting is successful.

Edit an alert rule

Perform the following steps to edit an alert rule. In this example, an application monitoring alert rule is edited.

  1. Log on to the ARMS console.
  2. In the left-side navigation pane, choose Alerts > Alert Policies.
  3. Optional:On the Alarm Policies page, enter the alert rule name in the search box and click Search.
    Note You can enter part of an alert rule name in the search box to perform a fuzzy search.
  4. Find the alert rule that you want to edit and click Edit in the Actions column.
  5. In the Edit Alarm dialog box, modify related parameters and click Save.
    1. Select Ding Ding Robot for the Notification Mode parameter.
    2. In the Notification Receiver section, add the contact group created in Create a contact group to the receiver list. In the Contact Groups list, click the name of the contact group. If the contact group appears in the Selected Groups list, the setting is successful.

Result

Now, you have configured a DingTalk chatbot that can send alert notifications. If an alert is triggered, you can receive an alert notification in the specified DingTalk group, as shown in the following figure. Example:Alert