You can use custom alert rules to monitor the status or resource usage of specified nodes based on your business requirements. This helps you identify and handle exceptions at the earliest opportunity. This topic describes how to create a custom alert rule on the Rule Management page. This topic also describes how to add a DingTalk chatbot and obtain the webhook URL of the chatbot.
Limits
- Custom alert rules take effect only on auto triggered node instances. The results of test instances and data backfill instances that are generated for auto triggered nodes are not monitored.
- Custom alert rules support the following alert notification methods: email, text message, DingTalk chatbot, and webhook URL. Limits on the supported alert notification methods:
- An alert notification can be sent by using a text message only in the following regions: Singapore, Malaysia (Kuala Lumpur), and Germany (Frankfurt).
- Webhook URL:
- The webhook URL-based alerting feature is supported only in DataWorks Enterprise Edition.
- The webhook URL-based alerting feature is supported in the following regions: China (Shanghai), China (Chengdu), China (Zhangjiakou), China (Beijing), China (Hangzhou), China (Shenzhen), China (Hong Kong), Germany (Frankfurt), and Singapore.
- An alert notification can be sent by using the webhook URL-based alerting feature only to WeCom or Lark.
Note DataWorks supports the webhook URL-based alerting feature only for DingTalk, WeCom, and Lark. If you want to use this notification method for other services, submit a ticket to contact Alibaba Cloud DataWorks technical support.
Precautions
For auto triggered nodes for which an error is reported, custom alert rules take effect on auto triggered node instances that are generated within three data timestamps. For auto triggered nodes in other states, custom alert rules take effect on auto triggered node instances that are generated within two data timestamps.
Note For example, if an alert rule is triggered for auto triggered node instances that are generated within the recent two data timestamps, that is, the current day and the previous day, the system sends an alert notification. Even if an alert rule is triggered after auto triggered node instances that are generated on the day before the previous day are run, the system does not send an alert notification.
Create a custom alert rule
- Go to the Operation Center page.
- Log on to the DataWorks console.
- In the left-side navigation pane, click Workspaces.
- In the top navigation bar, select the region where your workspace resides. Find your workspace, click the
icon in the Actions column, and then select Operation Center.
- In the left-side navigation pane, choose . Note
You can also go to the Cycle Task page, select multiple nodes, and then choose More > Add Alert Rule in the Actions column to create a custom alert rule for the nodes. For more information, see View and manage auto triggered nodes.
- On the page that appears, click Create Custom Rule.
- In the Create Custom Rule dialog box, configure the parameters.
- Click OK. An alert rule is created. On the Rule Management page, you can click View Details, Disable, Enable, or Delete in the Actions column that corresponds to a rule to perform the related operation.
- View Details: View basic information about the desired rule.
- Enable or disable: Enable or disable a rule. You can enable a rule to monitor the status of a node for which the rule is configured. You can view alert details on the Alert Management page. For more information, see View alert details.
- Delete: Delete a rule.
Scenario practices: Send alert notifications to a DingTalk group
- Go to the DingTalk group to which you want the system to send alert notifications and click the Group Settings icon in the upper-right corner.
- In the Group Settings panel, click Group Assistant.
- In the Group Assistant panel, click Add Robot.
- In the ChatBot dialog box, click the
icon.
- In the Please choose which robot to add section, click Custom.
- In the Robot details message, click Add.
- In the Add Robot dialog box, configure the parameters.
Parameter Description Chatbot name The name of the custom chatbot. Add to Group The DingTalk group to which the chatbot is added. This group cannot be changed. Custom Keywords After you specify custom keywords, messages can be sent only if these messages contain at least one of the specified keywords. You must add DataWorks as a keyword. This keyword is case-sensitive. Note You can specify a maximum of 10 keywords. A message can be sent only if it contains at least one of the specified keywords. - Read the terms of service, select I have read and accepted <<DingTalk Custom Robot Service Terms of Service>>, and then click Finished.
- After you complete the security settings, copy the webhook URL of the chatbot and click Finished. Important Keep the webhook URL confidential. If the webhook URL is leaked, your business is at risk.
- Go to the Rule Management page and click Create Custom Rule. In the Create Custom Rule dialog box, set the Notification Method parameter to DingTalk Chatbot, and paste the chatbot webhook URL that you copied from DingTalk in the Webhook Address column in the DingTalk Chatbot section.