Queries the information of event-triggered tasks.
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 ID of the region to which the event-triggered task belongs. |
cn-qingdao |
| ScalingGroupId |
string |
No |
The ID of the scaling group with which the event-triggered task is associated. |
asg-bp18p2yfxow2dloq**** |
| AlarmTaskId |
string |
No |
The ID of the event-triggered task. |
asg-bp1hvbnmkl10vll5****_f95ce797-dc2e-4bad-9618-14fee7d1**** |
| State |
string |
No |
The state 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 type of the metric. Valid values:
|
system |
| MetricName |
string |
No |
The name of the metric. |
CpuUtilization |
| PageSize |
integer |
No |
The number of entries per page in a paging query. Maximum value: 50. Default value: 10. |
10 |
| PageNumber |
integer |
No |
The page number of the event-triggered task list. Pages start from page 1. Default value: 1. |
1 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The information of event-triggered tasks. |
||
| PageSize |
integer |
The number of entries per page. |
10 |
| RequestId |
string |
The request ID. |
871C7C53-34A4-45AA-8C14-4B72FA6A**** |
| PageNumber |
integer |
The current page number. |
1 |
| TotalCount |
integer |
The total number of event-triggered tasks. |
2 |
| AlarmList |
object |
||
| Alarm |
array<object> |
The list of event-triggered tasks. |
|
|
array<object> |
The list of event-triggered tasks. |
||
| AlarmTaskId |
string |
The ID of the event-triggered task. |
asg-bp1hvbnmkl10vll5****_f95ce797-dc2e-4bad-9618-14fee7d1**** |
| MetricName |
string |
The name of the metric. Valid values:
For more information, see System monitoring event-triggered tasks. |
CpuUtilization |
| EvaluationCount |
integer |
The number of times that the threshold condition must be met before the scaling rule is triggered. For example, if this parameter is set to 3, the scaling rule is triggered only when the average CPU utilization is greater than or equal to 80% for three consecutive times. |
3 |
| State |
string |
The state of the event-triggered task. Valid values:
|
ALARM |
| Period |
integer |
The period based on which metric data is collected. Unit: seconds. Valid values:
Note
A statistical period of 15 seconds is supported only for scaling groups that contain ECS instances. |
300 |
| ScalingGroupId |
string |
The ID of the scaling group with which the event-triggered task is associated. |
asg-bp18p2yfxow2dloq**** |
| ComparisonOperator |
string |
The comparison operator used to compare the metric value with the threshold. Valid values:
|
>= |
| Effective |
string |
The effective period of the event-triggered task. |
* * * * * ? |
| 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. Meeting the threshold expression for the specified number of times will trigger the scaling rule. |
80.0 |
| Enable |
boolean |
Indicates whether the event-triggered task is enabled. Valid values:
|
true |
| Statistics |
string |
The statistical method used to collect metric data. Valid values:
|
Average |
| Dimensions |
object |
||
| Dimension |
array<object> |
The dimension information associated with the metric. |
|
|
object |
The dimension information associated with the metric. |
||
| DimensionKey |
string |
The key of the dimension associated with the metric. Valid values:
|
device |
| DimensionValue |
string |
The value of the dimension associated with the metric. The valid values are determined by the dimension key.
|
eth0 |
| AlarmActions |
object |
||
| AlarmAction |
array |
The list of unique identifiers of the scaling rules associated with the event-triggered task. |
|
|
string |
The list of unique identifiers of the scaling rules associated with the event-triggered task. |
ari:acs:ess:cn-hangzhou:1406926474****:scalingrule/asr-bp163l21e07uh**** |
|
| Expressions |
object |
||
| Expression |
array<object> |
The information about the multi-metric alert rule. |
|
|
object |
The information about the multi-metric alert rule. |
||
| MetricName |
string |
The name of the metric for the multi-metric alert rule. Valid values:
For more information, see System monitoring event-triggered tasks (node). |
CpuUtilization |
| ComparisonOperator |
string |
The comparison operator used to compare the metric value with the threshold in the multi-metric alert rule. Valid values:
Default value: >=. |
>= |
| Period |
integer |
The period based on which metric data is collected in the multi-metric alert rule. Unit: seconds. Valid values:
Note
A statistical period of 15 seconds is supported only for scaling groups that contain ECS instances. |
900 |
| Statistics |
string |
The statistical method used to collect metric data in the multi-metric alert rule. Valid values:
|
Average |
| Threshold |
number |
The threshold of the metric in the multi-metric alert rule. Meeting the threshold expression for the specified number of times will trigger the scaling rule. |
40.0 |
| ExpressionsLogicOperator |
string |
The logical operator that specifies the relationship between multiple monitoring metrics alert conditions. Valid values:
|
&& |
| HybridMonitorNamespace |
string |
The ID of the monitoring metrics repository for Hybrid Cloud Monitor. To manage monitoring metrics repositories, see Manage monitoring metrics repositories. |
aliyun-test |
| HybridMetrics |
object |
||
| HybridMetric |
array<object> |
The monitoring metrics settings for Hybrid Cloud Monitor. For more information about how to configure the settings, see Use formula operations to customize target tracking scaling rules. |
|
|
array<object> |
|||
| Id |
string |
The reference ID of the metric in the metric operation expression. |
a |
| Expression |
string |
The metric operation expression for multiple Hybrid Cloud Monitor monitoring metrics. The calculation result of the expression is used to trigger scale-out and scale-in. The operation expression must comply with the Reverse Polish Notation (RPN) specification, and only the |
(a+b)/2 |
| MetricName |
string |
The name of the monitoring metrics in the Hybrid Cloud Monitor repository. |
AliyunSmq_NumberOfMessagesVisible |
| Statistic |
string |
The statistical method of the metric. Valid values:
|
Average |
| Dimensions |
object |
||
| Dimension |
array<object> |
The dimension of the metric. It is used to specify the resource monitored by the metric. |
|
|
object |
|||
| DimensionKey |
string |
The key of the metric dimension. |
queue |
| DimensionValue |
string |
The value of the metric dimension. |
testQueue |
| PromQL |
string |
The PromQL query statement for Hybrid Cloud Monitor. |
(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": {
"Alarm": [
{
"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": {
"Dimension": [
{
"DimensionKey": "device",
"DimensionValue": "eth0"
}
]
},
"AlarmActions": {
"AlarmAction": [
"ari:acs:ess:cn-hangzhou:1406926474****:scalingrule/asr-bp163l21e07uh****"
]
},
"Expressions": {
"Expression": [
{
"MetricName": "CpuUtilization",
"ComparisonOperator": ">=",
"Period": 900,
"Statistics": "Average",
"Threshold": 40
}
]
},
"ExpressionsLogicOperator": "&&",
"HybridMonitorNamespace": "aliyun-test",
"HybridMetrics": {
"HybridMetric": [
{
"Id": "a",
"Expression": "(a+b)/2",
"MetricName": "AliyunSmq_NumberOfMessagesVisible",
"Statistic": "Average",
"Dimensions": {
"Dimension": [
{
"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.