Queries event-triggered tasks. You can call the DescribeAlarms operation to learn about the configurations of event-triggered tasks and keep updated on monitoring data changes. This helps you troubleshoot system resource issues at the earliest opportunity and ensures system stability and reliability.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
Action | String | Yes | DescribeAlarms | The operation that you want to perform. Set the value to DescribeAlarms. |
RegionId | String | Yes | cn-qingdao | The region ID of the event-triggered task. |
ScalingGroupId | String | No | asg-bp18p2yfxow2dloq**** | The ID of the scaling group that is monitored by the event-triggered task. |
AlarmTaskId | String | No | asg-bp1hvbnmkl10vll5****_f95ce797-dc2e-4bad-9618-14fee7d1**** | The ID of the event-triggered task. |
State | String | No | OK | The status of the event-triggered task. Valid values:
|
IsEnable | Boolean | No | true | Specifies whether the Event-triggered Task feature is enabled. Valid values:
|
MetricType | String | No | system | The type of the metric used by the event-triggered task. Valid values:
|
MetricName | String | No | CpuUtilization | The metric name. |
PageSize | Integer | No | 10 | The number of entries per page. Maximum value: 50. Default value: 10. |
PageNumber | Integer | No | 1 | The page number. Page numbers start from 1. Default value: 1. |
Response parameters
Parameter | Type | Example | Description |
PageSize | Integer | 10 | The number of entries per page. |
RequestId | String | 871C7C53-34A4-45AA-8C14-4B72FA6A**** | The request ID. |
PageNumber | Integer | 1 | The page number. |
TotalCount | Integer | 2 | The total number of event-triggered tasks. |
AlarmList | Array of Alarm | The event-triggered tasks. | |
Alarm | |||
AlarmTaskId | String | asg-bp1hvbnmkl10vll5****_f95ce797-dc2e-4bad-9618-14fee7d1**** | The ID of the event-triggered task. |
MetricName | String | CpuUtilization | The metric name. Valid values:
For more information, see Event-triggered tasks of the system monitoring type. |
EvaluationCount | Integer | 3 | The number of times that the threshold must be reached before a scaling rule is executed. For example, if you set this parameter to 3, the average CPU utilization must reach 80% three times in a row before a scaling rule is executed. |
State | String | ALARM | The status of the event-triggered task. Valid values:
|
Period | Integer | 300 | The statistical period of the metric data. Unit: seconds. Valid values:
Note You can set this parameter to 15 seconds only for scaling groups of the Elastic Compute Service (ECS) type. |
ScalingGroupId | String | asg-bp18p2yfxow2dloq**** | The ID of the scaling group that is monitored by the event-triggered task. |
ComparisonOperator | String | >= | The operator that is used to compare the metric value and the metric threshold.
|
Effective | String | * * * * * ? | The period during which the event-triggered task is in effect. |
Description | String | Test alarm task. | The description of the event-triggered task. |
MetricType | String | system | The type of the metric used by the event-triggered task. Valid values:
|
Name | String | TestAlarmTask | The name of the event-triggered task. |
Threshold | Float | 80.0 | The threshold of the metric value. If the threshold is reached the specified number of times within the specified period, a scaling rule is executed. |
Enable | Boolean | true | Indicates whether the Event-triggered Task feature is enabled. Valid values:
|
Statistics | String | Average | The method that is used to collect statistics about the metric. Valid values:
|
Dimensions | Array of Dimension | The dimensions of the metric. | |
Dimension | |||
DimensionKey | String | device | The dimension key of the metric. Valid values:
|
DimensionValue | String | eth0 | The dimension value of the metric. The value of this parameter varies based on the value of DimensionKey.
Valid values for
|
AlarmActions | Array of String | ari:acs:ess:cn-hangzhou:1406926474****:scalingrule/asr-bp163l21e07uh**** | The unique identifiers of the scaling rules that are associated with the event-triggered tasks. |
Expressions | Array of Expression | The expressions defined in the multi-metric alert rule. | |
Expression | |||
MetricName | String | CpuUtilization | The names of the metrics in the multi-metric alert rule. Valid values:
For more information, see Event-triggered tasks of the system monitoring type. |
ComparisonOperator | String | >= | The operator that is used to compare the metric value and the threshold.
Default value: >=. |
Period | Integer | 900 | The period of time during which statistics about the metrics in the multi-metric alert rule is collected. Unit: seconds. Valid values:
Note You can set this parameter to 15 seconds only for scaling groups of the ECS type. |
Statistics | String | Average | The method that is used to collect statistics about the metrics in the multi-metric alert rule. Valid values:
|
Threshold | Float | 40.0 | The thresholds of the metric values in the multi-metric alert rule. If the thresholds are reached the specified number of times within the statistical period, a scaling rule is executed. |
ExpressionsLogicOperator | String | && | The relationship between the trigger conditions that are specified in the multi-metric alert rule. Valid values:
|
Examples
Sample requests
http(s)://ess.aliyuncs.com/?Action=DescribeAlarms
&RegionId=cn-qingdao
&ScalingGroupId=asg-bp18p2yfxow2dloq****
&AlarmTaskId=asg-bp1hvbnmkl10vll5****_f95ce797-dc2e-4bad-9618-14fee7d1****
&State=OK
&IsEnable=true
&MetricType=system
&MetricName=CpuUtilization
&PageSize=10
&PageNumber=1
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<DescribeAlarmsResponse>
<PageSize>10</PageSize>
<RequestId>871C7C53-34A4-45AA-8C14-4B72FA6A****</RequestId>
<PageNumber>1</PageNumber>
<TotalCount>2</TotalCount>
<AlarmList>
<AlarmTaskId>asg-bp1hvbnmkl10vll5****_f95ce797-dc2e-4bad-9618-14fee7d1****</AlarmTaskId>
<MetricName>CpuUtilization</MetricName>
<EvaluationCount>3</EvaluationCount>
<State>ALARM</State>
<Period>300</Period>
<ScalingGroupId>asg-bp18p2yfxow2dloq****</ScalingGroupId>
<ComparisonOperator>>=</ComparisonOperator>
<Effective>* * * * * ?</Effective>
<Description>Test alarm task.</Description>
<MetricType>system</MetricType>
<Name>TestAlarmTask</Name>
<Threshold>80</Threshold>
<Enable>true</Enable>
<Statistics>Average</Statistics>
<Dimensions>
<DimensionKey>device</DimensionKey>
<DimensionValue>eth0</DimensionValue>
</Dimensions>
<AlarmActions>ari:acs:ess:cn-hangzhou:1406926474****:scalingrule/asr-bp163l21e07uh****</AlarmActions>
<Expressions>
<MetricName>CpuUtilization</MetricName>
<ComparisonOperator>>=</ComparisonOperator>
<Period>900</Period>
<Statistics>Average</Statistics>
<Threshold>40</Threshold>
</Expressions>
<ExpressionsLogicOperator>&&</ExpressionsLogicOperator>
</AlarmList>
</DescribeAlarmsResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"PageSize" : 10,
"RequestId" : "871C7C53-34A4-45AA-8C14-4B72FA6A****",
"PageNumber" : 1,
"TotalCount" : 2,
"AlarmList" : [ {
"AlarmTaskId" : "asg-bp1hvbnmkl10vll5****_f95ce797-dc2e-4bad-9618-14fee7d1****",
"MetricName" : "CpuUtilization",
"EvaluationCount" : 3,
"State" : "ALARM",
"Period" : 300,
"ScalingGroupId" : "asg-bp18p2yfxow2dloq****",
"ComparisonOperator" : ">=",
"Effective" : "* * * * * ?",
"Description" : "Test alarm task.",
"MetricType" : "system",
"Name" : "TestAlarmTask",
"Threshold" : 80,
"Enable" : true,
"Statistics" : "Average",
"Dimensions" : [ {
"DimensionKey" : "device",
"DimensionValue" : "eth0"
} ],
"AlarmActions" : [ "ari:acs:ess:cn-hangzhou:1406926474****:scalingrule/asr-bp163l21e07uh****" ],
"Expressions" : [ {
"MetricName" : "CpuUtilization",
"ComparisonOperator" : ">=",
"Period" : 900,
"Statistics" : "Average",
"Threshold" : 40
} ],
"ExpressionsLogicOperator" : "&&"
} ]
}
Error codes
For a list of error codes, see Service error codes.