呼叫 DescribeEventRuleAttribute 介面查詢指定事件報警規則的詳情。
介面說明
本文將提供一個示例,查詢事件報警規則testRule的詳情。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
|
操作 |
存取層級 |
資源類型 |
條件關鍵字 |
關聯操作 |
|
cms:DescribeEventRuleAttribute |
get |
*All Resource
|
無 | 無 |
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| RuleName |
string |
是 |
事件報警規則名稱。 關於如何取得事件報警規則名稱,請參見 DescribeEventRuleList 。 |
testRule |
| SilenceTime |
string |
否 |
通道沉默週期。 單位:秒,預設值:86400(1 天)。 說明
當監控資料持續超過報警規則閾值時,每個沉默週期內只傳送一次報警通知。 |
86400 |
關於公共請求參數的詳情,請參見公共參數。
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
|||
| Code |
string |
狀態碼。 說明
200 表示成功。 |
200 |
| Message |
string |
錯誤資訊。 |
The alert does not exist. |
| RequestId |
string |
請求 ID。 |
9AA3F210-C03D-4C86-8DB6-21C84FF692A1 |
| Success |
boolean |
操作是否成功。取值:
|
true |
| Result |
object |
事件報警規則詳情。 |
|
| EventType |
string |
事件類型。取值:
|
SYSTEM |
| GroupId |
string |
應用分組 ID。 |
3607**** |
| Name |
string |
事件報警規則的名稱。 |
test_DefaultEventRule_7378**** |
| Description |
string |
事件報警規則的描述資訊。 |
Default group event rule. |
| State |
string |
事件報警規則的狀態。取值:
|
ENABLED |
| EventPattern |
object |
事件模式。用於描述事件的觸發條件。 |
|
| Product |
string |
雲產品名稱。 |
CloudMonitor |
| LevelList |
object |
||
| LevelList |
array |
事件警示規則的層級的列表。 |
|
|
string |
事件警示規則的層級。取值:
|
["CRITICAL","WARN"] |
|
| StatusList |
object |
||
| StatusList |
array |
事件警示規則的狀態的列表。 |
|
|
string |
事件狀態。 |
Running |
|
| NameList |
object |
||
| NameList |
array |
事件警示規則的名稱的列表。 |
|
|
string |
事件名稱。 |
Agent_Status_Running |
|
| EventTypeList |
object |
||
| EventTypeList |
array |
事件警示規則的類型列表。 |
|
|
string |
事件警示規則的類型。
|
* |
|
| SQLFilter |
string |
按照 SQL 過濾日誌。如果符合條件,則觸發警示。 |
ycccluster1 and (i-23ij0o82612 or Executed1) or Asimulated not 222 |
| KeywordFilterObj |
object |
過濾關鍵詞。 |
|
| Keywords |
object |
||
| keyword |
array |
事件匹配的關鍵字列表。 |
|
|
string |
關鍵字。 |
VMException |
|
| Relation |
string |
多個關鍵字的條件。取值:
|
OR |
樣本
正常返回樣本
JSON格式
{
"Code": "200",
"Message": "The alert does not exist.",
"RequestId": "9AA3F210-C03D-4C86-8DB6-21C84FF692A1",
"Success": true,
"Result": {
"EventType": "SYSTEM",
"GroupId": "3607****",
"Name": "test_DefaultEventRule_7378****",
"Description": "Default group event rule.",
"State": "ENABLED",
"EventPattern": {
"Product": "CloudMonitor",
"LevelList": {
"LevelList": [
"[\"CRITICAL\",\"WARN\"] "
]
},
"StatusList": {
"StatusList": [
"Running"
]
},
"NameList": {
"NameList": [
"Agent_Status_Running"
]
},
"EventTypeList": {
"EventTypeList": [
"*"
]
},
"SQLFilter": "ycccluster1 and (i-23ij0o82612 or Executed1) or Asimulated not 222",
"KeywordFilterObj": {
"Keywords": {
"keyword": [
"VMException"
]
},
"Relation": "OR"
}
}
}
}
錯誤碼
|
HTTP status code |
錯誤碼 |
錯誤資訊 |
描述 |
|---|---|---|---|
| 400 | InvalidParameterValue | Illegal parameters. | |
| 500 | InternalError | The request processing has failed due to some unknown error. | |
| 403 | AccessForbidden | User not authorized to operate on the specified resource. | |
| 404 | %s | %s |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。