Queries information about 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 where the event-triggered task resides. |
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 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 monitoring metric. Valid values:
|
system |
| MetricName |
string |
No |
The name of the monitoring metric. |
CpuUtilization |
| PageSize |
integer |
No |
The number of entries per page for paging queries. Settings the number of rows per page. Maximum value: 50. Default value: 10. |
10 |
| PageNumber |
integer |
No |
The page number of the event-triggered task list. Minimum value: 1. Default value: 1. |
1 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The information about 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 |
Metric name. Possible values:
For more information, see System monitoring event-triggered tasks. |
CpuUtilization |
| EvaluationCount |
integer |
The number of times the threshold expression must be satisfied to trigger the execution of a scaling rule. For example, the average CPU utilization must be greater than or equal to 80% in three consecutive statistical evaluations. |
3 |
| State |
string |
Status of the event-triggered task. Possible values:
|
ALARM |
| Period |
integer |
The statistic period for monitoring metric data, in seconds. Valid values:
Note
Only scaling groups of the ECS type support a statistic period of 15 seconds. |
300 |
| ScalingGroupId |
string |
ID of the scaling group associated with the event-triggered task. |
asg-bp18p2yfxow2dloq**** |
| ComparisonOperator |
string |
Comparison operator between the metric statistic value and the threshold, which specifies the condition under which the metric statistic value meets the threshold. Possible values:
|
>= |
| Effective |
string |
The effective period of the event-triggered task. |
* * * * * ? |
| Description |
string |
Description of the event-triggered task. |
Test alarm task. |
| MetricType |
string |
The metric type. Valid values:
|
system |
| Name |
string |
The name of the event-triggered task. |
TestAlarmTask |
| Threshold |
number |
The threshold of the metric. When the threshold expression is satisfied for the specified number of times, the scaling rule is triggered. |
80.0 |
| Enable |
boolean |
Indicates whether the event-triggered task is enabled. Valid values:
|
true |
| Statistics |
string |
The method for calculating statistics on metric data. Possible 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. Possible values:
|
device |
| DimensionValue |
string |
The information value of the dimension associated with the metric. The valid values depend on the dimension key.
|
eth0 |
| AlarmActions |
object |
||
| AlarmAction |
array |
A list of UUIDs of scaling rules associated with the event-triggered task. |
|
|
string |
A list of UUIDs of scaling rules associated with the event-triggered task. |
ari:acs:ess:cn-hangzhou:1406926474****:scalingrule/asr-bp163l21e07uh**** |
|
| Expressions |
object |
||
| Expression |
array<object> |
Information about the multi-metric alert rule. |
|
|
object |
Information about the multi-metric alert rule. |
||
| MetricName |
string |
The metric name for a multi-metric alert rule. Possible values:
For more information, see System monitoring event-triggered tasks. |
CpuUtilization |
| ComparisonOperator |
string |
The comparison operator used in a multi-metric alert rule to compare the metric statistic value with the threshold. It defines the condition under which the rule is triggered. Possible values:
Default value: >=. |
>= |
| Period |
integer |
The statistic period for monitoring metric data in a multi-metric alert rule, measured in seconds. Valid values:
Note
Only scaling groups of the ECS type support a statistic period of 15 seconds. |
900 |
| Statistics |
string |
The method used to calculate statistics for monitoring metric data in a multi-metric alert rule. Valid values:
|
Average |
| Threshold |
number |
The threshold of the metric in a multi-metric alert rule. When the threshold expression is satisfied for the specified number of times, the scaling rule is triggered. |
40.0 |
| ExpressionsLogicOperator |
string |
The logical relationship between multiple metric-based alert conditions. Possible values:
|
&& |
| HybridMonitorNamespace |
string |
Hybrid Cloud Monitoring metric repository ID. To manage metric repositories, see Manage metric repositories. |
aliyun-test |
| HybridMetrics |
object |
||
| HybridMetric |
array<object> |
Hybrid Cloud Monitoring metric settings. For more information about how to configure these settings, see Use formula calculation to create Custom target tracking rules. |
|
|
array<object> |
|||
| Id |
string |
The reference ID of the metric in the metric operation expression. |
a |
| Expression |
string |
An arithmetic expression of multiple Hybrid Cloud Monitoring metrics. The result of evaluating this expression is used to trigger scale-in or scale-out operations. The expression must conform to the Reverse Polish Notation (RPN) format, and only the operators |
(a+b)/2 |
| MetricName |
string |
The Metric Name in the Hybrid Cloud Monitoring repository. |
AliyunSmq_NumberOfMessagesVisible |
| Statistic |
string |
The statistical method for the metric. Possible values:
|
Average |
| Dimensions |
object |
||
| Dimension |
array<object> |
Metric dimension. Used to specify the resource being monitored by the metric. |
|
|
object |
|||
| DimensionKey |
string |
Dimension key of the metric. |
queue |
| DimensionValue |
string |
Dimension value of the metric. |
testQueue |
| PromQL |
string |
Prometheus Query Language (PromQL) statement for 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": {
"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.