Creates an alert rule for a Data Integration task of a new version. Only the following type of task is supported: real-time data synchronization from a MySQL database to Hologres.
Operation description
You can configure alert rules only for tasks that can be used for real-time data synchronization.
Debugging
Authorization information
Request parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| DIJobId | long | Yes | The ID of the task with which the alert rule is associated. | 11265 |
| Description | string | No | The description of the task. | mysql synchronizes to hologres heartbeat alert |
| MetricType | string | Yes | The metric type in the alert rule. Valid values:
| Heartbeat |
| TriggerConditions | array<object> | Yes | The conditions that are used to trigger the alert rule. | |
| object | Yes | The condition that is used to trigger the alert rule. | ||
| Severity | string | No | The severity level. Valid values:
| Warning |
| Duration | long | No | The time interval for alert calculation. Unit: minutes. | 15 |
| Threshold | long | No | The alert threshold.
| 5 |
| NotificationSettings | object | Yes | The alert notification settings. | |
| NotificationChannels | array<object> | Yes | The alert notification methods. | |
| object | No | The alert notification method. | ||
| Severity | string | No | The severity level. Valid values:
| Warning |
| Channels | array | No | The alert notification methods. | |
| string | No | The alert notification method. Valid values:
| Ding | |
| NotificationReceivers | array<object> | Yes | The settings of alert notification recipients. | |
| object | No | The setting of an alert notification recipient. | ||
| ReceiverType | string | No | The recipient type. Valid values: AliyunUid and DingToken.
| DingToken |
| ReceiverValues | array | No | The recipients. | |
| string | No | The recipient.
| token1 | |
| InhibitionInterval | integer | No | The duration of the alert suppression interval. Default value: 5. Unit: minutes. | 5 |
| Enabled | boolean | No | Specifies whether to enable the alert rule. By default, the alert rule is disabled. | true |
Response parameters
Examples
Sample success responses
JSONformat
{
"RequestId": "C636A747-7E4E-594D-94CD-2B4F8A9A9A63",
"DIAlarmRuleId": 34988
}Error codes
| HTTP status code | Error code | Error message | Description |
|---|---|---|---|
| 403 | Forbidden.Access | Access is forbidden. Please first activate DataWorks Enterprise Edition or Flagship Edition. | No permission, please authorize |
| 429 | Throttling.Api | The request for this resource has exceeded your available limit. | - |
| 429 | Throttling.System | The DataWorks system is busy. Try again later. | - |
| 429 | Throttling.User | Your request is too frequent. Try again later. | - |
| 500 | InternalError.System | An internal system error occurred. Try again later. | - |
| 500 | InternalError.UserId.Missing | An internal system error occurred. Try again later. | - |
For a list of error codes, visit the Service error codes.
Change history
| Change time | Summary of changes | Operation |
|---|
