ListAlertRules
Retrieves a paginated list of custom monitoring alert rules.
Try it now
Test
RAM authorization
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| Owner |
string |
No |
The Alibaba Cloud UID of the owner of the custom rule. |
1933790683**** |
| TaskIds |
array |
No |
The IDs of the scheduling tasks. |
|
|
integer |
No |
The ID of the scheduling task. |
1234 |
|
| Types |
array |
No |
The list of alert trigger types. |
|
|
string |
No |
The type of the alert trigger. Valid values:
|
Error |
|
| Receiver |
string |
No |
The Alibaba Cloud UID of the alert recipient. |
1933790683**** |
| Name |
string |
No |
Filters by alert rule name. Partial name matching is supported. |
error_rule |
| PageNumber |
integer |
Yes |
The page number. Minimum value: 1. |
1 |
| PageSize |
integer |
Yes |
The number of entries per page. Maximum value: 100. |
10 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| RequestId |
string |
The request ID. You can use this ID to locate logs and troubleshoot issues. |
A6C6B486-E3A2-5D52-9E76-D938048**** |
| PagingInfo |
object |
The pagination information. |
|
| TotalCount |
integer |
The total number of alert rules that meet the query conditions. |
5 |
| PageNumber |
integer |
The page number. |
1 |
| PageSize |
integer |
The number of entries per page. |
10 |
| AlertRules |
array<object> |
The list of alert rules that meet the query conditions. You can pass the |
|
|
array<object> |
|||
| Id |
integer |
The ID of the custom rule. |
22125 |
| Name |
string |
The name of the custom rule. |
error_test |
| Owner |
string |
The Alibaba Cloud UID of the owner of the custom rule. |
1933790683**** |
| Enabled |
boolean |
Indicates whether the alert rule is enabled. |
true |
| TriggerCondition |
object |
The condition that triggers the alert. |
|
| Type |
string |
The type of the alert trigger. Valid values:
|
Error |
| Extension |
object |
The extension information. Some trigger conditions require configuration. |
|
| Error |
object |
The error alert configuration. |
|
| StreamTaskIds |
array |
The IDs of the real-time computing tasks to be monitored. |
|
|
integer |
The ID of the real-time computing task. |
123 |
|
| AutoRerunAlertEnabled |
boolean |
Specifies whether to generate an alert when an offline task is automatically rerun due to a failure. |
false |
| Timeout |
object |
The timeout alert configuration. |
|
| TimeoutInMinutes |
integer |
The timeout period. Unit: minutes. |
10 |
| UnFinished |
object |
The settings for alerts when an instance has not finished. |
|
| UnFinishedTime |
string |
The deadline for completion, in |
12:00 |
| CycleUnfinished |
object |
The settings for alerts when a cycle has not finished. |
|
| CycleAndTime |
array<object> |
The list of cycle and time configurations. |
|
|
object |
|||
| CycleId |
integer |
The cycle ID. Valid values: 1 to 288. |
1 |
| Time |
string |
The deadline for completion, in |
01:00 |
| InstanceErrorCount |
object |
The alert configuration for the number of error task instances. |
|
| Count |
integer |
The number of error task instances. Valid values: 1 to 10000. |
10 |
| InstanceErrorPercentage |
object |
The alert configuration for the proportion of error task instances. |
|
| Percentage |
integer |
The proportion of error instances. Valid values: 1 to 100. |
10 |
| InstanceTransferFluctuate |
object |
The alert configuration for the fluctuation in the number of task-to-instance transfers. |
|
| Trend |
string |
The type of fluctuation in task-to-instance transfers. Valid values:
|
abs |
| Percentage |
integer |
The percentage of fluctuation in task-to-instance transfers. Valid values: 1 to 100. |
10 |
| Target |
object |
The monitored object. |
|
| Type |
string |
The monitored object type. Valid values:
|
Task |
| Ids |
array |
The IDs of the monitored objects. |
|
|
integer |
The ID of the monitored object. |
32567 |
|
| AllowTasks |
array |
The whitelist of monitored nodes. |
|
|
integer |
The ID of the node in the monitoring whitelist. |
123123 |
Examples
Success response
JSON format
{
"RequestId": "A6C6B486-E3A2-5D52-9E76-D938048****",
"PagingInfo": {
"TotalCount": 5,
"PageNumber": 1,
"PageSize": 10,
"AlertRules": [
{
"Id": 22125,
"Name": "error_test",
"Owner": "1933790683****",
"Enabled": true,
"TriggerCondition": {
"Type": "Error",
"Extension": {
"Error": {
"StreamTaskIds": [
123
],
"AutoRerunAlertEnabled": false
},
"Timeout": {
"TimeoutInMinutes": 10
},
"UnFinished": {
"UnFinishedTime": "12:00"
},
"CycleUnfinished": {
"CycleAndTime": [
{
"CycleId": 1,
"Time": "01:00"
}
]
},
"InstanceErrorCount": {
"Count": 10
},
"InstanceErrorPercentage": {
"Percentage": 10
},
"InstanceTransferFluctuate": {
"Trend": "abs",
"Percentage": 10
}
},
"Target": {
"Type": "Task",
"Ids": [
32567
],
"AllowTasks": [
123123
]
}
}
}
]
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.