擷取自訂監控警示規則。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| Id |
string |
否 |
自訂警示規則 ID。 |
28547072 |
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
Schema of Response |
||
| RequestId |
string |
請求的 ID,用於定位日誌、排查問題。 |
8abcb91f-d266-4073-b907-2ed**** |
| AlertRule |
object |
自訂規則詳情。 |
|
| Id |
integer |
自訂規則 ID。 |
16035 |
| Name |
string |
自訂規則名。 |
error_rule |
| Owner |
string |
自訂規則的責任人阿里雲 UID。 |
279961421580845157 |
| Enabled |
boolean |
警示規則是否啟用。 |
true |
| Notification |
object |
警示通知配置。 |
|
| SilenceStartTime |
string |
靜默開始時間,格式為 HH:mm:ss 。 |
00:00:00 |
| SilenceEndTime |
string |
靜默結束時間,格式為 HH:mm:ss 。 |
00:00:00 |
| IntervalInMinutes |
integer |
警示間隔,單位為分鐘,取值範圍[5,10000]。 |
30 |
| Maximum |
integer |
一個自然日內的警示最大次數,取值範圍[1, 10000]。 |
3 |
| Channels |
array |
警示通道列表。 |
|
|
string |
警示通道,枚舉值:
|
Sms |
|
| Receivers |
array<object> |
警示接收對象。 |
|
|
object |
|||
| ReceiverType |
string |
警示接收物件類型,枚舉值:
|
WebhookUrl |
| ReceiverValues |
array |
警示接收對象值。 |
|
|
string |
警示接收對象值。當 ReceiverType 為 AliUid 時填阿里雲 UID,為 ShiftSchedule 時填值班表 ID,為 WebhookUrl / DingdingUrl / FeishuUrl / WeixinUrl 時填入對應的 URL。 |
123123123 |
|
| Extension |
string |
警示對象需要的額外配置,當 ReceiverType 為 DingdingUrl,支援設定 {"atAll":true} @所有人。 |
{"atAll":true} |
| TriggerCondition |
object |
觸發警示的條件。 |
|
| Type |
string |
觸發警示的類型,枚舉值:
|
Error |
| Extension |
object |
擴充資訊,部分觸發條件需要配置。 |
|
| Error |
object |
出錯警示配置。 |
|
| StreamTaskIds |
array |
監控Realtime Compute任務時,填入對應的任務 ID。 |
|
|
integer |
Realtime Compute任務 ID。 |
123123 |
|
| AutoRerunAlertEnabled |
boolean |
離線任務由於失敗自動重跑,是否產生警示。 |
false |
| Timeout |
object |
逾時警示配置。 |
|
| TimeoutInMinutes |
integer |
逾時時間,單位為分鐘。 |
10 |
| UnFinished |
object |
未完成警示配置。 |
|
| UnFinishedTime |
string |
未完成時間,格式為 hh:mm,hh 的取值範圍為[0,47],mm 的取值範圍為[0,59]。 |
12:00 |
| CycleUnfinished |
object |
周期未完成警示配置。 |
|
| CycleAndTime |
array<object> |
周期和時間配置列表。 |
|
|
object |
|||
| CycleId |
integer |
周期 ID,取值範圍為[1,288]。 |
1 |
| Time |
string |
逾時時間,格式為 hh:mm,hh 的取值範圍為[0,47],mm 的取值範圍為[0,59]。 |
12:00 |
| InstanceErrorCount |
object |
執行個體出錯數量警示配置。 |
|
| Count |
integer |
出錯的執行個體數,取值範圍為[1,10000]。 |
10 |
| InstanceErrorPercentage |
object |
執行個體出錯比例警示配置。 |
|
| Percentage |
integer |
出錯執行個體佔比,取值範圍 [1-100]。 |
10 |
| InstanceTransferFluctuate |
object |
轉執行個體數量波動警示配置。 |
|
| Trend |
string |
轉執行個體波動類型,枚舉值:
|
10 |
| Percentage |
integer |
轉執行個體波動百分比,取值範圍[1-100]。 |
10 |
| Target |
object |
監控對象。 |
|
| Type |
string |
監控物件類型,枚舉值:
|
Task |
| Ids |
array |
監控物件識別碼 列表。 |
|
|
integer |
監控物件識別碼。 |
32570 |
|
| AllowTasks |
array |
監控任務白名單列表。 |
|
|
integer |
監控任務白名單 ID。 |
123123 |
樣本
正常返回樣本
JSON格式
{
"RequestId": "8abcb91f-d266-4073-b907-2ed****",
"AlertRule": {
"Id": 16035,
"Name": "error_rule",
"Owner": "279961421580845157",
"Enabled": true,
"Notification": {
"SilenceStartTime": "00:00:00",
"SilenceEndTime": "00:00:00",
"IntervalInMinutes": 30,
"Maximum": 3,
"Channels": [
"Sms"
],
"Receivers": [
{
"ReceiverType": "WebhookUrl",
"ReceiverValues": [
"123123123"
],
"Extension": "{\"atAll\":true}"
}
]
},
"TriggerCondition": {
"Type": "Error",
"Extension": {
"Error": {
"StreamTaskIds": [
123123
],
"AutoRerunAlertEnabled": false
},
"Timeout": {
"TimeoutInMinutes": 10
},
"UnFinished": {
"UnFinishedTime": "12:00"
},
"CycleUnfinished": {
"CycleAndTime": [
{
"CycleId": 1,
"Time": "12:00"
}
]
},
"InstanceErrorCount": {
"Count": 10
},
"InstanceErrorPercentage": {
"Percentage": 10
},
"InstanceTransferFluctuate": {
"Trend": "10",
"Percentage": 10
}
},
"Target": {
"Type": "Task",
"Ids": [
32570
],
"AllowTasks": [
123123
]
}
}
}
}
錯誤碼
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。