Integrate a custom webhook

Updated at:

When you use a custom webhook for DataWorks monitoring and alerting, DataWorks pushes alert messages to your webhook service over the public network by default. You can select a connection method based on the deployment environment of the webhook service. To use the public network method, add the DataWorks public egress IP addresses to the allowlist of the webhook service. To use the internal network method, specify a resource group that can connect to the webhook service in the tenant alert policy, and the resource group sends the alert messages. This ensures that alert messages are delivered.

Usage notes

  • Network limits: Alert messages are pushed over the public network by default. If your webhook service is deployed in an internal network, you can specify a resource group that can connect to the webhook service in the tenant alert policy, and the resource group sends the alert messages. For more information about the two connection methods, see Public network mode and Internal network mode.

  • Edition limits: Custom webhooks are supported only in DataWorks Enterprise Edition.

Network configuration

By default, DataWorks pushes alert messages to your webhook service over the public network. You can choose the public network mode or the internal network mode based on the deployment environment of your webhook service.

Public network mode

By default, DataWorks pushes alert messages to your webhook service over the public network, and no additional network configuration is required.

Note

Skip this step if your webhook service does not use allowlist-based access control.

If your webhook service uses an allowlist for access control, add the following public IP addresses of DataWorks to that allowlist.

Region name

Region ID

IP address

China (Beijing)

cn-beijing

47.93.5.9,47.93.60.157,47.94.111.106,59.110.166.34,60.205.184.153,60.205.227.157,60.205.223.44,123.56.217.46,123.57.155.168,123.57.243.71

China (Zhangjiakou)

cn-zhangjiakou

39.100.0.109,39.100.9.117,39.100.9.121

China (Hangzhou)

cn-hangzhou

47.96.30.97,47.97.175.135,116.62.247.242,120.27.233.168,121.40.70.19,121.199.31.66,121.199.41.143,121.199.61.16

China (Shanghai)

cn-shanghai

47.100.10.242,47.101.166.155,47.101.179.29,47.101.196.116,101.132.179.94,106.14.1.102,106.15.197.122,106.15.202.114

China (Shenzhen)

cn-shenzhen

47.107.81.9,47.112.11.104,47.112.21.108,47.112.22.239,47.112.23.85

Malaysia (Kuala Lumpur)

ap-southeast-3

47.254.198.127,47.254.200.185

Japan (Tokyo)

ap-northeast-1

47.74.22.81,47.74.23.43

South Korea (Seoul)

ap-northeast-2

47.80.13.207,47.80.10.92

China (Chengdu)

cn-chengdu

47.108.64.120,47.108.119.242

Singapore

ap-southeast-1

47.74.209.97,47.74.229.187,47.74.243.124

Indonesia (Jakarta)

ap-southeast-5

149.129.253.151,149.129.253.185

China (Hong Kong)

cn-hongkong

47.52.128.224,47.244.33.205

Germany (Frankfurt)

eu-central-1

47.91.89.154,47.254.153.91

US (Virginia)

us-east-1

47.89.191.99,47.90.253.133

US (Silicon Valley)

us-west-1

47.88.4.25,47.88.6.226

UK (London)

eu-west-1

8.208.12.7,8.208.15.6

China East 2 Finance

cn-shanghai-finance-1

139.224.120.181,139.224.122.217,139.224.144.132,139.224.145.23,139.224.149.100

China South 1 Finance

cn-shenzhen-finance-1

112.74.242.199,112.74.244.59,112.74.246.74,112.74.246.212

China North 2 Finance

cn-beijing-finance-1

8.141.252.42,8.141.252.231

China North 2 Ali Gov 1

cn-north-2-gov-1

39.107.177.30,39.107.177.140

SAU (Riyadh - Partner Region)

me-central-1

8.213.30.84,8.213.30.232

Internal network mode

If your webhook service is deployed in an internal network, you can specify a resource group that can connect to the webhook service for the custom webhook in the tenant alert policy. The resource group sends alert messages. This way, alert messages do not leave the internal network and are transmitted in a more secure manner.

  1. Log on to the DataWorks console and go to the Operation Center. In the left-side navigation pane, click Monitoring and Alerting > Rule Management.

  2. Click Tenant Alert Policy Settings.

  3. Select a resource group that can connect to your webhook service for Custom Webhook Resource Group (only Serverless resource groups are supported) to complete the configuration. For more information about tenant alert policies, see Tenant alert policy settings. For more information about how to configure network connectivity for a resource group, see Configure network connectivity.

Note

If no resource group is selected, custom webhooks in the tenant send alert messages over the public network by default. After the configuration takes effect, a message appears at the top of the Alert information page, indicating that resource group-based sending is enabled for custom webhooks in the current tenant. You can click Modify Configuration in the message to change the settings.

Message format

DataWorks sends alert messages to your custom webhook service in the JSON format. The following sections describe the connectivity test payload, message body examples, and field descriptions for each alert type.

Connectivity test

{
 "message":{
 "content": "DataWorks Workbench Alarm Connectivity Test"
 }
}

Custom alerts

Message body

Alerts for auto triggered instances

{
 "message": {
 "title": "DataWorks_Remind",
 "remind_name": "webhookTest",
 "remind_unit": "Task"
 "occur_time": "2021-07-13 16:16:20",
 "remind_type": "uncompleted",
 "task_size": 1,
 "node_id_list": "220167523",
 "node_name_list": "nodeName",
 "node_owner_list": "123123123",
 "remind_founder": "jingyan20182222",
 "number_of_alerts": 3,
 "more_information": "http://..."
 }
} 

Alerts for resource groups

{
 "message": {
 "title": "DataWorks_Remind",
 "remind_name": "Alert rule name",
 "remind_unit": "ScheduleResourceGroup",
 "occur_time": "2021-07-13 16:16:20",
 "remind_type": "resGroup use ratio",
 "resource_group_name": "Resource group name",
 "threshold": 99,
 "duration": 30,
 "remind_founder": "jingyan20182222"
 }
}

Fields

Field

Description

Example

title

The title of the alert.

DataWorks_Remind

task_size

The number of tasks.

1

remind_name

The name of the alert rule.

webhookTest

occur_time

The time when the alert was triggered.

2021-07-13 16:16:20

remind_type

The trigger condition.

Valid values:

  • completed

  • uncompleted

  • error

  • cycle uncompleted

  • run over time

  • exhausted error

  • resGroup use ratio

  • the number of waiting task in resGroup

completed

node_id_list

The node IDs. Separate multiple IDs with commas (,). A maximum of five node IDs are supported.

220167523

node_name_list

The node names. Separate multiple names with commas (,). A maximum of five node names are supported.

nodeName

node_owner_list

The node owners. Separate multiple owners with commas (,). A maximum of five node owners are supported.

123123

remind_founder

The creator of the alert rule.

jingyan20182222

remind_unit

The monitoring granularity of the alert rule.

Valid values:

  • Task

  • Baseline

  • Project

  • BizProcess

  • ScheduleResourceGroup

  • DiResourceGroup

Task

number_of_alerts

The nth trigger of the alert.

3

more_information

The URL of the desired auto triggered instance in Operation Center.

http://XXXX

threshold

The threshold. This parameter is available only for resource groups.

  • If the remind_type parameter is set to resGroup use ratio, this parameter specifies the upper limit of the resource group usage.

  • If the remind_type parameter is set to the number of waiting task in resGroup, this parameter specifies the upper limit of instances that are waiting for resources.

99

duration

The duration. Unit: minutes. This parameter is available only for resource groups.

30

Baseline alerts

Message body

{
 "message": {
 "cycle_number": 1,
 "occur_time": "2024-07-31 11:29:43",
 "baseline_owners": "dp3base",
 "baseline_name": "Baseline test",
 "key_instance": 10590018690,
 "sla_time": "2024-07-30 17:30:00",
 "buffer": -1081,
 "title": "DataWorks_Baseline_Alert",
 "status": "overSla"
 }
}

Fields

Field

Description

Example

cycle_number

The ID of the cycle of the baseline instance. The ID of a day-level cycle is 1.

1

occur_time

The time when the alert was triggered.

2024-07-31 11:29:43

baseline_owners

The baseline owner.

dp3base

baseline_name

The name of the baseline.

baseline_test

key_instance

The current key instance.

10590018690

sla_time

The committed completion time.

2024-07-30 17:30:00

buffer

The alert margin threshold for a baseline. Unit: minutes.

-1081

title

The title that specifies the alert type.

DataWorks_Baseline_Alert

status

The status of the baseline. Valid values:

  • dangerous

  • overSla

overSla

Event alerts

Message body

{
 "message": {
 "task_name": "Name of a failed task",
 "event_type": "ERROR",
 "task_owner_name": "dp3base",
 "occur_time": "2024-07-30 23:06:06",
 "event_name": "20240729-10000213793(Failed hour-level baseline)(24)-[project:lwt_test_hongkong]Error",
 "title": "DataWorks_Event_Remind"
 }
}

Fields

Field

Description

Example

task_name

The name of the abnormal task.

failed_task

event_type

The type of the event. Valid values:

  • ERROR

  • SLOW

ERROR

task_owner_name

The owner of the task.

dp3base

occur_time

The time when the alert was triggered.

2024-07-30 23:06:06

event_name

The name of the event. Format:

Data timestamp-Node ID(node name)(cycle ID)-[project:Workspace name]

20240729-10000213793(failed_task)(1)-[project:lwt_test_hongkong]Error

title

The title that specifies the alert type.

DataWorks_Event_Remind