Queries event-triggered tasks, including their configurations and monitoring data changes. This helps you detect system resource anomalies early and ensure system stability.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ess:DescribeAlarms |
get |
*ScalingGroup
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
The region ID of the event-triggered task. |
cn-qingdao |
| ScalingGroupId |
string |
No |
The ID of the scaling group associated with the event-triggered task. |
asg-bp18p2yfxow2dloq**** |
| AlarmTaskId |
string |
No |
The ID of the event-triggered task. |
asg-bp1hvbnmkl10vll5****_f95ce797-dc2e-4bad-9618-14fee7d1**** |
| State |
string |
No |
The status of the event-triggered task. Valid values:
|
OK |
| IsEnable |
boolean |
No |
Specifies whether the event-triggered task is enabled. Valid values:
|
true |
| MetricType |
string |
No |
The metric type. Valid values:
|
true |
| MetricName |
string |
No |
The metric name. |
CpuUtilization |
| PageSize |
integer |
No |
The number of entries per page. Valid values: 1 to 50. Default value: 10. |
10 |
| PageNumber |
integer |
No |
The page number. Pages start from page 1. Default value: 1. |
1 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response parameters. |
||
| PageSize |
integer |
The number of entries returned per page. |
10 |
| RequestId |
string |
The ID of the request. |
871C7C53-34A4-45AA-8C14-4B72FA6A**** |
| PageNumber |
integer |
The page number of the returned page. |
1 |
| TotalCount |
integer |
The total number of event-triggered tasks. |
2 |
| AlarmList |
array<object> |
The event-triggered tasks. |
|
|
array<object> |
The event-triggered task. |
||
| AlarmTaskId |
string |
The ID of the event-triggered task. |
asg-bp1hvbnmkl10vll5****_f95ce797-dc2e-4bad-9618-14fee7d1**** |
| MetricName |
string |
The metric name. Valid values:
For more information, see Event-triggered tasks of the system monitoring type. |
CpuUtilization |
| EvaluationCount |
integer |
The number of consecutive times 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 or exceed 80% three times in a row before a scaling rule is executed. |
3 |
| State |
string |
The status of the event-triggered task. Valid values:
|
ALARM |
| Period |
integer |
The statistical period of the metric data. Unit: seconds. Valid values:
Note
You can set the value of this parameter to 15 Seconds only for scaling groups of the ECS type. |
300 |
| ScalingGroupId |
string |
The ID of the scaling group associated with the event-triggered task. |
asg-bp18p2yfxow2dloq**** |
| ComparisonOperator |
string |
The operator used to compare the metric value and the metric threshold.
|
>= |
| Effective |
string |
The effective period of the event-triggered task. |
Test |
| Description |
string |
The description of the event-triggered task. |
Test alarm task. |
| MetricType |
string |
The type of the metric. Valid values:
|
system |
| Name |
string |
The name of the event-triggered task. |
TestAlarmTask |
| Threshold |
number |
The threshold of the metric. When the threshold is reached the specified number of times within the statistical period, a scaling rule is executed. |
80.0 |
| Enable |
boolean |
Indicates whether the event-triggered task is enabled. Valid values:
|
true |
| Statistics |
string |
The method used to aggregate the metric data. Valid values:
|
Average |
| Dimensions |
array<object> |
The metric dimensions. |
|
|
object |
Details of the dimensions. |
||
| DimensionKey |
string |
The dimension key of the metric. Valid values:
|
device |
| DimensionValue |
string |
The dimension value of the metric. The value of DimensionValue depends on the value of DimensionKey.
|
eth0 |
| AlarmActions |
array |
The unique identifiers of the scaling rules that are associated with the event-triggered task. |
|
|
string |
The unique identifier of the scaling rule that is associated with the event-triggered task. |
ari:acs:ess:cn-hangzhou:1406926474****:scalingrule/asr-bp163l21e07uh**** |
|
| Expressions |
array<object> |
The alert conditions of the multi-metric alert rule. |
|
|
object |
The expressions that are specified in the multi-metric alert rule. |
||
| MetricName |
string |
The name of the metric that is specified in the multi-metric alert rule. Valid values:
For more information, see Event-triggered tasks of the system monitoring type. |
CpuUtilization |
| ComparisonOperator |
string |
The operator used to compare the metric value and the threshold.
|
>= |
| Period |
integer |
The statistical period of the metric data in the multi-metric alert rule. Unit: seconds. Valid values:
Note
If your scaling group is of the ECS type and the event-triggered task that is associated with your scaling group monitors CloudMonitor metrics, you can set Period to 15. In most cases, the name of a CloudMonitor metric contains Agent. |
900 |
| Statistics |
string |
The method used to aggregate statistics about the metrics in the multi-metric alert rule. Valid values:
|
Average |
| Threshold |
number |
The threshold of the metric value. When the threshold is reached the specified number of times within the specified period, a scaling rule is executed. |
40.0 |
| ExpressionsLogicOperator |
string |
The relationship between the trigger conditions in the multi-metric alert rule. Valid values:
|
&& |
| HybridMonitorNamespace |
string |
The ID of the Hybrid Cloud Monitoring namespace. For information about how to manage Hybrid Cloud Monitoring namespaces, see Manage namespaces. |
aliyun-test |
| HybridMetrics |
array<object> |
The Hybrid Cloud Monitoring metrics. |
|
|
array<object> |
|||
| Id |
string |
The reference ID of the metric in the metric expression. |
a |
| Expression |
string |
The metric expression that consists of multiple Hybrid Cloud Monitoring metrics. The result is used to trigger scaling events. The expression is written in Reverse Polish Notation (RPN) format and supports only the following operators: |
(a+b)/2 |
| MetricName |
string |
The name of the Hybrid Cloud Monitoring metric. |
AliyunSmq_NumberOfMessagesVisible |
| Statistic |
string |
The statistical method of the metric value. Valid values:
|
Average |
| Dimensions |
array<object> |
The metric dimensions. Used to specify the monitored resources. |
|
|
object |
|||
| DimensionKey |
string |
The key of the metric dimension. |
queue |
| DimensionValue |
string |
The key of the metric dimension. |
testQueue |
| PromQL |
string |
The PromQL statement of Hybrid Cloud Monitoring. |
(avg(last_over_time(AliyunMnsnew_ActiveMessages{region='cn-hangzhou',userId='123456****',queue='testQueue'}[900s])) by (userId))/(avg(last_over_time(AliyunEss_RunningInstanceCount{instanceId='asg-bp1****'}[900s])) by (userId) != 0) |
Examples
Success response
JSON format
{
"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": "Test",
"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": "&&",
"HybridMonitorNamespace": "aliyun-test",
"HybridMetrics": [
{
"Id": "a",
"Expression": "(a+b)/2",
"MetricName": "AliyunSmq_NumberOfMessagesVisible",
"Statistic": "Average",
"Dimensions": [
{
"DimensionKey": "queue",
"DimensionValue": "testQueue"
}
]
}
],
"PromQL": "(avg(last_over_time(AliyunMnsnew_ActiveMessages{region='cn-hangzhou',userId='123456****',queue='testQueue'}[900s])) by (userId))/(avg(last_over_time(AliyunEss_RunningInstanceCount{instanceId='asg-bp1****'}[900s])) by (userId) != 0)"
}
]
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.