Queries the details of initiative alert rules.
Debugging
Request parameters
| Parameter | Type | Required | Example | Description |
|---|---|---|---|---|
| Action | String | Yes | DescribeActiveMetricRuleList | The operation that you want to perform. Set the value to DescribeActiveMetricRuleList. |
| Product | String | Yes | ecs | The abbreviation of the cloud service that supports initiative alert rules. For more information about how to obtain the name of a cloud service, see DescribeProductsOfActiveMetricRule. |
Response parameters
| Parameter | Type | Example | Description |
|---|---|---|---|
| Code | String | 200 | The HTTP status code. Note The status code 200 indicates that the request was successful. |
| Message | String | The Request is not authorization. | The error message. |
| RequestId | String | F82E6667-7811-4BA0-842F-5B2DC42BBAAD | The request ID. |
| Success | Boolean | true | Indicates whether the request was successful. Valid values:
|
| Datapoints | Array of Alarm | The details of the alert rules. | |
| Alarm | |||
| SilenceTime | String | 86400 | The mute period during which new alerts are not sent even if the trigger conditions are met. Unit: seconds. |
| MetricName | String | cpu_total | The name of the metric. |
| EvaluationCount | String | 3 | The consecutive number of times for which the metric value meets the trigger condition before an alert is triggered. |
| Webhook | String | https://www.aliyun.com | The callback URL. |
| State | String | Enable | Indicates whether the alert rule is enabled. |
| ContactGroups | String | ECS_Group | The alert contact group. |
| Namespace | String | acs_ecs_dashboard | The namespace of the cloud service. |
| RuleName | String | SystemDefault_acs_rds_dashboard_CpuUsage | The name of the alert rule. |
| RuleId | String | a151cd6023eacee2f0978e03863cc1697c89508**** | The ID of the alert rule. |
| Period | String | 60 | The aggregation period of monitoring data. Unit: seconds. |
| ComparisonOperator | String | > | The comparison operator that is used in the alert rule. Valid values:
|
| EndTime | String | 24 | The end of the time period during which the alert rule is effective. Unit: hours. For example, the value 23 indicates |
| StartTime | String | 00 | The beginning of the time period during which the alert rule is effective. Unit: hours. For example, the value 00 indicates |
| Threshold | String | 90 | The alert threshold. |
| Statistics | String | Average | The statistical method. |
| Enable | String | true | Indicates whether the alert rule is enabled. Valid values:
|
| AlertList | Array of Alert | The details of the alert rules. The result is in the same structure as that returned by the DescribeMetricRuleList operation. | |
| Alert | |||
| SilenceTime | String | 86400 | The mute period during which new alerts are not sent even if the trigger conditions are met. Unit: seconds. |
| MetricName | String | cpu_total | The name of the metric. |
| Webhook | String | http://www.aliyun.com | The callback URL. |
| ContactGroups | String | ECS_Group | The alert contact group. |
| Namespace | String | acs_ecs_dashboard | The namespace of the cloud service. |
| EffectiveInterval | String | 00:00-23:59 | The time period during which the alert rule is effective. |
| NoEffectiveInterval | String | 00:00-06:00 | The time period during which the alert rule is ineffective. |
| MailSubject | String | ECS_Bucket | The subject of the alert notification email. |
| RuleName | String | myAlert | The name of the alert rule. |
| RuleId | String | ruleIdxxxx | The ID of the alert rule. |
| Period | String | 60 | The aggregation period of monitoring data. Unit: seconds. |
| AlertState | String | OK | The status of the alert rule. Valid values:
|
| Dimensions | String | "" | The monitoring data of the specified resource. |
| EnableState | Boolean | true | Indicates whether the alert rule is enabled. Valid values:
|
| Resources | String | [{"resource":"_ALL"}] | The resources that are associated with the alert rule. |
| Escalations | Object | The conditions for triggering different levels of alerts. | |
| Info | Object | The conditions for triggering Info-level alerts. | |
| ComparisonOperator | String | GreaterThanThreshold | The comparison operator that is used to compare the metric value with the threshold for Info-level alerts. Valid values:
|
| Times | String | 3 | The consecutive number of times for which the metric value exceeds the threshold for Info-level alerts before an alert is triggered. |
| Threshold | String | 95 | The threshold for Info-level alerts. |
| Statistics | String | Average | The statistical methods for Info-level alerts. |
| Warn | Object | The condition for triggering Warn-level alerts. | |
| ComparisonOperator | String | GreaterThanThreshold | The comparison operator that is used to compare the metric value with the threshold for Critical-level alerts. Valid values:
|
| Times | String | 3 | The consecutive number of times for which the metric value exceeds the threshold for Warn-level alerts before an alert is triggered. |
| Threshold | String | 80 | The threshold for Warn-level alerts. |
| Statistics | String | Average | The statistical methods for Warn-level alerts. |
| Critical | Object | The conditions for triggering Critical-level alerts. | |
| ComparisonOperator | String | GreaterThanThreshold | The comparison operator that is used to compare the metric value with the threshold for Critical-level alerts. Valid values:
|
| Times | String | 3 | The consecutive number of times for which the metric value exceeds the threshold for Critical-level alerts before an alert is triggered. |
| Threshold | String | 99 | The threshold for Critical-level alerts. |
| Statistics | String | Average | The statistical methods for Critical-level alerts. |
Examples
Sample requests
http(s)://[Endpoint]/?Action=DescribeActiveMetricRuleList
&Product=ecs
&<Common request parameters>Sample success responses
XML format
HTTP/1.1 200 OK
Content-Type:application/xml
<DescribeActiveMetricRuleListResponse>
<AlertList>
<Alert>
<SilenceTime>86400</SilenceTime>
<ContactGroups>ECS_Group</ContactGroups>
<NoEffectiveInterval></NoEffectiveInterval>
<MailSubject>${serviceType}-${metricName}-${levelDescription}</MailSubject>
<RuleId>SystemDefault_acs_rds_dashboard_IOPSUsage</RuleId>
<Period>300</Period>
<Dimensions></Dimensions>
<EffectiveInterval></EffectiveInterval>
<Namespace>acs_rds_dashboard</Namespace>
<AlertState>INSUFFICIENT_DATA</AlertState>
<MetricName>IOPSUsage</MetricName>
<EnableState>true</EnableState>
<Escalations>
<Critical />
<Info>
<ComparisonOperator>GreaterThanThreshold</ComparisonOperator>
<Times>5</Times>
<Statistics>Average</Statistics>
<Threshold>80</Threshold>
</Info>
<Warn />
</Escalations>
<Webhook></Webhook>
<Resources>[{\"resource\":\"_ALL\"}]</Resources>
<RuleName>SystemDefault_acs_rds_dashboard_IOPSUsage</RuleName>
</Alert>
<Alert>
<SilenceTime>86400</SilenceTime>
<ContactGroups>ECS_Group</ContactGroups>
<NoEffectiveInterval></NoEffectiveInterval>
<MailSubject>${serviceType}-${metricName}-${levelDescription}</MailSubject>
<RuleId>SystemDefault_acs_rds_dashboard_CpuUsage</RuleId>
<Period>300</Period>
<Dimensions></Dimensions>
<EffectiveInterval></EffectiveInterval>
<Namespace>acs_rds_dashboard</Namespace>
<AlertState>INSUFFICIENT_DATA</AlertState>
<MetricName>CpuUsage</MetricName>
<EnableState>true</EnableState>
<Escalations>
<Critical />
<Info>
<ComparisonOperator>GreaterThanThreshold</ComparisonOperator>
<Times>5</Times>
<Statistics>Average</Statistics>
<Threshold>80</Threshold>
</Info>
<Warn />
</Escalations>
<Webhook></Webhook>
<Resources>[{\"resource\":\"_ALL\"}]</Resources>
<RuleName>SystemDefault_acs_rds_dashboard_CpuUsage</RuleName>
</Alert>
</AlertList>
<Datapoints>
<Alarm>
<SilenceTime>86400</SilenceTime>
<ContactGroups>[\"Alice\"]</ContactGroups>
<ComparisonOperator>GreaterThanThreshold</ComparisonOperator>
<EndTime></EndTime>
<RuleId>SystemDefault_acs_rds_dashboard_IOPSUsage</RuleId>
<StartTime></StartTime>
<Period>300</Period>
<EvaluationCount>5</EvaluationCount>
<Statistics>Average</Statistics>
<Namespace>acs_rds_dashboard</Namespace>
<MetricName>IOPSUsage</MetricName>
<State>INSUFFICIENT_DATA</State>
<Enable>true</Enable>
<Webhook></Webhook>
<RuleName>SystemDefault_acs_rds_dashboard_IOPSUsage</RuleName>
<Threshold>80</Threshold>
</Alarm>
<Alarm>
<SilenceTime>86400</SilenceTime>
<ContactGroups>[\"Jim\"]</ContactGroups>
<ComparisonOperator>GreaterThanThreshold</ComparisonOperator>
<EndTime></EndTime>
<RuleId>SystemDefault_acs_rds_dashboard_CpuUsage</RuleId>
<StartTime></StartTime>
<Period>300</Period>
<EvaluationCount>5</EvaluationCount>
<Statistics>Average</Statistics>
<Namespace>acs_rds_dashboard</Namespace>
<MetricName>CpuUsage</MetricName>
<State>INSUFFICIENT_DATA</State>
<Enable>true</Enable>
<Webhook></Webhook>
<RuleName>SystemDefault_acs_rds_dashboard_CpuUsage</RuleName>
<Threshold>80</Threshold>
</Alarm>
</Datapoints>
<Code>200</Code>
<Success>true</Success>
</DescribeActiveMetricRuleListResponse>JSON format
HTTP/1.1 200 OK
Content-Type:application/json
{
"AlertList" : {
"Alert" : [ {
"SilenceTime" : 86400,
"ContactGroups" : "ECS_Group",
"NoEffectiveInterval" : "",
"MailSubject" : "${serviceType}-${metricName}-${levelDescription}",
"RuleId" : "SystemDefault_acs_rds_dashboard_IOPSUsage",
"Period" : 300,
"Dimensions" : "",
"EffectiveInterval" : "",
"Namespace" : "acs_rds_dashboard",
"AlertState" : "INSUFFICIENT_DATA",
"MetricName" : "IOPSUsage",
"EnableState" : true,
"Escalations" : {
"Critical" : { },
"Info" : {
"ComparisonOperator" : "GreaterThanThreshold",
"Times" : 5,
"Statistics" : "Average",
"Threshold" : "80"
},
"Warn" : { }
},
"Webhook" : "",
"Resources" : "[{\"resource\":\"_ALL\"}]",
"RuleName" : "SystemDefault_acs_rds_dashboard_IOPSUsage"
}, {
"SilenceTime" : 86400,
"ContactGroups" : "ECS_Group",
"NoEffectiveInterval" : "",
"MailSubject" : "${serviceType}-${metricName}-${levelDescription}",
"RuleId" : "SystemDefault_acs_rds_dashboard_CpuUsage",
"Period" : 300,
"Dimensions" : "",
"EffectiveInterval" : "",
"Namespace" : "acs_rds_dashboard",
"AlertState" : "INSUFFICIENT_DATA",
"MetricName" : "CpuUsage",
"EnableState" : true,
"Escalations" : {
"Critical" : { },
"Info" : {
"ComparisonOperator" : "GreaterThanThreshold",
"Times" : 5,
"Statistics" : "Average",
"Threshold" : "80"
},
"Warn" : { }
},
"Webhook" : "",
"Resources" : "[{\"resource\":\"_ALL\"}]",
"RuleName" : "SystemDefault_acs_rds_dashboard_CpuUsage"
} ]
},
"Datapoints" : {
"Alarm" : [ {
"SilenceTime" : 86400,
"ContactGroups" : "[\"Alice\"]",
"ComparisonOperator" : "GreaterThanThreshold",
"EndTime" : "",
"RuleId" : "SystemDefault_acs_rds_dashboard_IOPSUsage",
"StartTime" : "",
"Period" : 300,
"EvaluationCount" : 5,
"Statistics" : "Average",
"Namespace" : "acs_rds_dashboard",
"MetricName" : "IOPSUsage",
"State" : "INSUFFICIENT_DATA",
"Enable" : true,
"Webhook" : "",
"RuleName" : "SystemDefault_acs_rds_dashboard_IOPSUsage",
"Threshold" : "80"
}, {
"SilenceTime" : 86400,
"ContactGroups" : "[\"Jim\"]",
"ComparisonOperator" : "GreaterThanThreshold",
"EndTime" : "",
"RuleId" : "SystemDefault_acs_rds_dashboard_CpuUsage",
"StartTime" : "",
"Period" : 300,
"EvaluationCount" : 5,
"Statistics" : "Average",
"Namespace" : "acs_rds_dashboard",
"MetricName" : "CpuUsage",
"State" : "INSUFFICIENT_DATA",
"Enable" : true,
"Webhook" : "",
"RuleName" : "SystemDefault_acs_rds_dashboard_CpuUsage",
"Threshold" : "80"
} ]
},
"Code" : "200",
"Success" : true
}Error codes
| HTTP status code | Error code | Error message | Description |
|---|---|---|---|
| 404 | ResourceNotFound | The specified resource is not found. | The specified resource is not found. |
For a list of error codes, see Service error codes.