查询数据集成新版任务告警规则列表,当前支持的任务类型包括:MySQL到Hologres整库实时同步任务。
当您的任务同步类型中包含实时同步时,支持设置告警规则。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
请求参数
名称 |
类型 |
是否必选 |
示例值 |
描述 |
Action | String | 是 | ListDIAlarmRules | 系统规定参数。取值:ListDIAlarmRules。 |
DIJobId | Long | 是 | 11260 | 任务ID,是告警规则关联的任务ID。 |
PageNumber | Long | 否 | 1 | 页码,默认为1。 |
PageSize | Long | 否 | 10 | 分页大小,默认为10。 |
返回数据
名称 |
类型 |
示例值 |
描述 |
RequestId | String | 74C2FECD-5B3A-554A-BCF5-351A36DE9815 | 请求ID。 |
DIAlarmRulePaging | Object | 告警规则分页结果。 |
|
TotalCount | Long | 2 | 总记录数。 |
PageNumber | Long | 1 | 页码。 |
PageSize | Long | 10 | 分页大小。 |
DIJobAlarmRules | Array of DIJobAlarmRule | 告警规则列表。 |
|
DIAlarmRuleId | Long | 41998 | 告警规则ID。 |
DIJobId | Long | 11260 | 任务ID,是告警规则关联的任务ID。 |
Description | String | mysql同步到hologres心跳告警 | 描述。 |
MetricType | String | Heartbeat | 告警指标类型,可选的枚举值:
|
Enabled | Boolean | true | 告警规则是否启用。 |
TriggerConditions | Array of TriggerCondition | 告警触发条件列表,支持多条件。 |
|
Severity | String | Warning | 严重程度,可选的枚举值:
|
Duration | Long | 15 | 告警计算时间区间,单位分钟。 |
Threshold | Long | 5 | 告警阈值。
|
NotificationSettings | Object | 告警通知设置。 |
|
NotificationChannels | Array of NotificationChannel | 告警通知渠道,支持多值。 |
|
Severity | String | Warning | 严重程度,可选的枚举值:
|
Channels | Array of String | Ding | 通道,可选的枚举值:
|
NotificationReceivers | Array of NotificationReceiver | 告警通知接收方,支持多值。 |
|
ReceiverType | String | DingToken | 接收方类型。
|
ReceiverValues | Array of String | token1 | 接收方取值。
|
InhibitionInterval | Integer | 5 | 告警抑制间隔时长,单位分钟。 |
示例
请求示例
http(s)://[Endpoint]/?Action=ListDIAlarmRules
&DIJobId=11260
&PageNumber=1
&PageSize=10
&公共请求参数
正常返回示例
XML
格式
HTTP/1.1 200 OK
Content-Type:application/xml
<ListDIAlarmRulesResponse>
<RequestId>74C2FECD-5B3A-554A-BCF5-351A36DE9815</RequestId>
<DIAlarmRulePaging>
<TotalCount>2</TotalCount>
<PageNumber>1</PageNumber>
<PageSize>10</PageSize>
<DIJobAlarmRules>
<DIAlarmRuleId>41998</DIAlarmRuleId>
<DIJobId>11260</DIJobId>
<Description>mysql同步到hologres心跳告警</Description>
<MetricType>Heartbeat</MetricType>
<Enabled>true</Enabled>
<TriggerConditions>
<Severity>Warning</Severity>
<Duration>15</Duration>
<Threshold>5</Threshold>
</TriggerConditions>
<NotificationSettings>
<NotificationChannels>
<Severity>Warning</Severity>
<Channels>Ding</Channels>
</NotificationChannels>
<NotificationReceivers>
<ReceiverType>DingToken</ReceiverType>
<ReceiverValues>token1</ReceiverValues>
</NotificationReceivers>
<InhibitionInterval>5</InhibitionInterval>
</NotificationSettings>
</DIJobAlarmRules>
</DIAlarmRulePaging>
</ListDIAlarmRulesResponse>
JSON
格式
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "74C2FECD-5B3A-554A-BCF5-351A36DE9815",
"DIAlarmRulePaging" : {
"TotalCount" : 2,
"PageNumber" : 1,
"PageSize" : 10,
"DIJobAlarmRules" : {
"DIAlarmRuleId" : 41998,
"DIJobId" : 11260,
"Description" : "mysql同步到hologres心跳告警",
"MetricType" : "Heartbeat",
"Enabled" : true,
"TriggerConditions" : {
"Severity" : "Warning",
"Duration" : 15,
"Threshold" : 5
},
"NotificationSettings" : {
"NotificationChannels" : {
"Severity" : "Warning",
"Channels" : "Ding"
},
"NotificationReceivers" : {
"ReceiverType" : "DingToken",
"ReceiverValues" : "token1"
},
"InhibitionInterval" : 5
}
}
}
}
错误码
HttpCode |
错误码 |
错误信息 |
描述 |
429 | Throttling.Api | The request for this resource has exceeded your available limit. | 对该资源的请求已超过您的可用上限。 |
429 | Throttling.System | The DataWorks system is busy. Try again later. | DataWorks系统繁忙,请稍后再试。 |
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. | 系统内部错误,请稍后再试。 |
访问错误中心查看更多错误码。
反馈
- 本页导读 (1)
文档反馈