Creates a custom monitoring alert rule.
Debugging
Authorization information
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
Name | string | Yes | The name of the rule. | xm_create_test |
Owner | string | Yes | The ID of the Alibaba Cloud account used by the creator of the rule. | 279114181716147735 |
Enabled | boolean | Yes | Indicates whether the rule is enabled. | true |
TriggerCondition | object | Yes | The conditions for triggering the alert. | |
Type | string | No | The condition for triggering the alert. Valid values:
| Error |
Extension | object | No | The extended information about the rule. This parameter is required for some trigger conditions. | |
Error | object | No | The alert configuration. This parameter takes effect only if the Type parameter is set to Error. | |
StreamTaskIds | array | No | The IDs of the real-time computing tasks. This parameter is required when you monitor real-time computing tasks. | |
long | No | The ID of the real-time computing task. | 123 | |
AutoRerunAlert | boolean | No | Indicates whether an alert is triggered if a batch synchronization task is rerun after it fails to run as expected. | false |
Timeout | object | No | The alert configuration. This parameter takes effect only if the Type parameter is set to Timeout. | |
TimeoutInMinutes | integer | No | The timeout period. Unit: minutes. Valid values: 1 to 21,600. | 10 |
UnFinished | object | No | The alert configuration. This parameter takes effect only if the Type parameter is set to UnFinished. | |
UnFinishedTime | string | No | The timeout period of the instance that is still running at a specified point in time. The time is in the hh:mm format. Valid values of hh: 0 to 47. Valid values of mm: 0 to 59. | 30:00 |
CycleUnfinished | object | No | The alert configuration. This parameter takes effect only if the Type parameter is set to CycleUnfinished. | |
CycleAndTime | array<object> | No | The configurations of the scheduling cycle and timeout period of the instance. | |
object | No | |||
CycleId | integer | No | The ID of the scheduling cycle of the instance. Valid values: 1 to 288. | 1 |
Time | string | No | The timeout period of instance running. The time is in the hh:mm format. Valid values of hh: 0 to 47. Valid values of mm: 0 to 59. | 12:00 |
InstanceErrorCount | object | No | The alert configuration. This parameter takes effect only if the Type parameter is set to InstanceErrorCount. | |
Count | integer | No | The number of instances on which an error occurs. Valid values: 1 to 10,000. | 5 |
InstanceErrorPercentage | object | No | The alert configuration. This parameter takes effect only if the Type parameter is set to InstanceErrorPercentage. | |
Percentage | integer | No | The percentage of the number of instances on which an error occurs in the workspace to the total number of instances on the current day. Valid values: 1 to 100. | 5 |
InstanceTransferFluctuate | object | No | The alert configuration. This parameter takes effect only if the Type parameter is set to InstanceTransferFluctuate. | |
Trend | string | No | The way in which the number of auto triggered node instances that are generated in your workspace significantly fluctuates. Valid values:
| abs |
Percentage | integer | No | The percentage of fluctuation in the number of auto triggered node instances that are generated in your workspace. Valid values: 1 to 100. | 10 |
Target | object | No | The monitored object. | |
Type | string | No | The type of the monitored object. Valid values:
| Task |
Ids | array | No | The IDs of monitored objects. | |
long | No | The ID of the monitored object. | 123123 | |
AllowTasks | array | No | The whitelists of the monitoring tasks. | |
long | No | The ID of the whitelist of the monitoring task. | 123 | |
Notification | object | No | The configuration for the alert notification. | |
SilenceStartTime | string | No | The beginning of the time range for silence. The time is in the HH:mm:ss format. | 00:00:00 |
SilenceEndTime | string | No | The end of the time range for silence. The time is in the HH:mm:ss format. | 00:00:00 |
IntervalInMinutes | integer | No | The interval at which an alert notification is sent. Unit: minutes. Valid values: 5 to 10,000. | 30 |
Maximum | integer | No | The maximum number of times an alert notification is sent within one calendar day. Valid values: 1 to 10,000. | 3 |
Channels | array | Yes | The alert channels. | |
string | No | The alert channel. Valid values:
| Sms | |
Receivers | array<object> | Yes | The alert recipient. | |
object | No | |||
ReceiverType | string | No | The type of the alert recipient. Valid valves:
| TaskOwner |
ReceiverValues | array | No | The IDs of the alert recipients. | |
string | No | The ID of the alert recipient. If the ReceiverType parameter is set to AliUid, set this parameter to the Alibaba Cloud account ID. If the ReceiverType parameter is set to ShiftSchedule, set this parameter to the shift schedule ID. If the ReceiverType parameter is set to WebhookUrl, DingdingUrl, FeishuUrl, or WeixinUrl, set this parameter to the corresponding URL. | 123123123 | |
Extension | string | No | The additional configuration of the alert recipient. If the ReceiverType parameter is set to DingdingUrl, you can set this parameter to {"atAll":true} to remind all members in a DingTalk group. | {"atAll":true} |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "A6C6B486-E3A2-5D52-9E76-D9380485D946\n",
"Id": 123123
}
Error codes
For a list of error codes, visit the Service error codes.