調用DescribeActiveMetricRuleList介面查詢一鍵警示規則的列表詳情。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
|
操作 |
存取層級 |
資源類型 |
條件關鍵字 |
關聯操作 |
|
cms:DescribeActiveMetricRuleList |
get |
*全部資源
|
無 | 無 |
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| Product |
string |
是 |
支援一鍵警示規則的雲產品名稱縮寫。 關於如何擷取雲產品名稱,請參見 DescribeProductsOfActiveMetricRule 。 |
ecs |
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
無。 |
||
| Code |
string |
狀態代碼。 說明
200 表示成功。 |
200 |
| Message |
string |
錯誤資訊。 |
The Request is not authorization. |
| RequestId |
string |
請求 ID。 |
F82E6667-7811-4BA0-842F-5B2DC42BBAAD |
| Success |
boolean |
操作是否成功。取值:
|
true |
| Datapoints |
object |
||
| Alarm |
array<object> |
警示規則列表。 |
|
|
object |
無。 |
||
| SilenceTime |
string |
通道沉默時間。 單位:秒。 |
86400 |
| MetricName |
string |
監控指標名稱。 |
cpu_total |
| EvaluationCount |
string |
警示重試次數。 |
3 |
| Webhook |
string |
URL 回調地址。 |
https://www.aliyun.com |
| State |
string |
警示規則的啟用狀態。 |
Enable |
| ContactGroups |
string |
警示連絡人群組。 |
ECS_Group |
| Namespace |
string |
雲產品的命名空間。 |
acs_ecs_dashboard |
| RuleName |
string |
警示規則名稱。 |
SystemDefault_acs_rds_dashboard_CpuUsage |
| RuleId |
string |
警示規則 ID。 |
a151cd6023eacee2f0978e03863cc1697c89508**** |
| Period |
string |
監控資料的彙總周期。 單位:秒。 |
60 |
| ComparisonOperator |
string |
警示規則比較符。取值:
|
> |
| EndTime |
string |
警示規則失效時間。 單位:小時。例如:23 表示 |
24 |
| StartTime |
string |
警示規則生效起始時間。 單位:小時。例如:00 表示 |
00 |
| Threshold |
string |
警示閾值。 |
90 |
| Statistics |
string |
統計方法。 |
Average |
| Enable |
string |
警示規則的啟用狀態。取值:
|
true |
| AlertList |
object |
||
| Alert |
array<object> |
警示規則列表。該列表的結構和擷取警示規則列表保持統一。 |
|
|
array<object> |
無。 |
||
| SilenceTime |
string |
通道沉默時間。 單位:秒。 |
86400 |
| MetricName |
string |
監控項的名稱。 |
cpu_total |
| Webhook |
string |
URL 回調地址。 |
http://www.aliyun.com |
| ContactGroups |
string |
警示連絡人群組。 |
ECS_Group |
| Namespace |
string |
雲端服務的命名空間。 |
acs_ecs_dashboard |
| EffectiveInterval |
string |
警示規則的生效時間段。 |
00:00-23:59 |
| NoEffectiveInterval |
string |
警示不生效的時間段。 |
00:00-06:00 |
| MailSubject |
string |
發送郵件的主題。 |
ECS_Bucket |
| RuleName |
string |
警示規則名稱。 |
myAlert |
| RuleId |
string |
警示規則 ID。 |
ruleIdxxxx |
| Period |
string |
監控資料的彙總周期。 單位:秒。 |
60 |
| AlertState |
string |
警示規則狀態。取值:
|
OK |
| Dimensions |
string |
指定資源的監控資料。 |
"" |
| EnableState |
boolean |
警示規則的啟用狀態。取值:
|
true |
| Resources |
string |
警示規則關聯的資源。 |
[{"resource":"_ALL"}] |
| Escalations |
object |
警示分層級觸發條件。 |
|
| Info |
object |
Info 層級警示觸發條件。 |
|
| ComparisonOperator |
string |
Info 層級閾值比較符。取值:
|
GreaterThanThreshold |
| Times |
string |
Info 層級連續出現次數。 Info 層級連續出現達到該值且超過閾值才會觸發警示。 |
3 |
| Threshold |
string |
Info 層級閾值。 |
95 |
| Statistics |
string |
Info 層級警示統計方法。 |
Average |
| Warn |
object |
Warn 層級警示觸發條件。 |
|
| ComparisonOperator |
string |
Warn 層級閾值比較符。取值:
|
GreaterThanThreshold |
| Times |
string |
Warn 層級連續出現次數。 Warn 層級連續出現達到該值且超過閾值才會觸發警示。 |
3 |
| Threshold |
string |
Warn 層級閾值。 |
80 |
| Statistics |
string |
Warn 層級警示統計方法。 |
Average |
| Critical |
object |
Critical 層級警示觸發條件。 |
|
| ComparisonOperator |
string |
Critical 層級閾值比較符。取值:
|
GreaterThanThreshold |
| Times |
string |
Critical 層級連續出現次數。Critical 層級連續出現達到該值且超過閾值才會觸發警示。 |
3 |
| Threshold |
string |
Critical 層級閾值。 |
99 |
| Statistics |
string |
Critical 層級警示統計方法。 |
Average |
樣本
正常返回樣本
JSON格式
{
"Code": "200",
"Message": "The Request is not authorization.",
"RequestId": "F82E6667-7811-4BA0-842F-5B2DC42BBAAD",
"Success": true,
"Datapoints": {
"Alarm": [
{
"SilenceTime": "86400",
"MetricName": "cpu_total",
"EvaluationCount": "3",
"Webhook": "https://www.aliyun.com",
"State": "Enable",
"ContactGroups": "ECS_Group",
"Namespace": "acs_ecs_dashboard",
"RuleName": "SystemDefault_acs_rds_dashboard_CpuUsage",
"RuleId": "a151cd6023eacee2f0978e03863cc1697c89508****",
"Period": "60",
"ComparisonOperator": ">",
"EndTime": "24",
"StartTime": "00",
"Threshold": "90",
"Statistics": "Average",
"Enable": "true"
}
]
},
"AlertList": {
"Alert": [
{
"SilenceTime": "86400",
"MetricName": "cpu_total",
"Webhook": "http://www.aliyun.com",
"ContactGroups": "ECS_Group",
"Namespace": "acs_ecs_dashboard",
"EffectiveInterval": "00:00-23:59",
"NoEffectiveInterval": "00:00-06:00",
"MailSubject": "ECS_Bucket",
"RuleName": "myAlert",
"RuleId": "ruleIdxxxx",
"Period": "60",
"AlertState": "OK",
"Dimensions": "\"\"",
"EnableState": true,
"Resources": "[{\"resource\":\"_ALL\"}]",
"Escalations": {
"Info": {
"ComparisonOperator": "GreaterThanThreshold",
"Times": "3",
"Threshold": "95",
"Statistics": "Average"
},
"Warn": {
"ComparisonOperator": "GreaterThanThreshold",
"Times": "3",
"Threshold": "80",
"Statistics": "Average"
},
"Critical": {
"ComparisonOperator": "GreaterThanThreshold",
"Times": "3",
"Threshold": "99",
"Statistics": "Average"
}
}
}
]
}
}
錯誤碼
|
HTTP status code |
錯誤碼 |
錯誤資訊 |
描述 |
|---|---|---|---|
| 400 | ParameterInvalid | %s | |
| 401 | AccessDeniedException | You donot have sufficient access to perform this action. | |
| 402 | LimitExceeded | The quota for this customer had been reached. | |
| 403 | AccessForbidden | The X.509 certificate or cms access key ID provided does not exist in our records. | |
| 404 | ResourceNotFound | The specified resource is not found. | 未找到指定資源。 |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。