All Products
Search
Document Center

Auto Scaling:DescribeAlarms

Last Updated:Oct 27, 2026

Queries the information of event-triggered tasks.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

ess:DescribeAlarms

get

*ScalingGroup

acs:ess:{#regionId}:{#accountId}:scalinggroup/{#ScalingGroupId}

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:

  • ALARM: The alert is triggered because the alert condition is met.

  • OK: The status is normal because the alert condition is not met.

  • INSUFFICIENT_DATA: The data is insufficient to determine whether the alert condition is met.

OK

IsEnable

boolean

No

Specifies whether the event-triggered task is enabled. Valid values:

  • true: The event-triggered task is enabled.

  • false: The event-triggered task is disabled.

true

MetricType

string

No

The type of the metric. Valid values:

  • system: system metrics of CloudMonitor

  • custom: custom metrics reported to CloudMonitor

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:

  • CpuUtilization: the CPU utilization of an ECS instance (%).

  • ConcurrentConnections: the number of concurrent connections to an ECS instance.

  • IntranetTx: the outbound traffic over the internal network of an ECS instance (Kb/min).

  • IntranetRx: the inbound traffic over the internal network of an ECS instance (Kb/min).

  • VpcInternetTx: the outbound traffic over the Internet of a VPC-connected ECS instance (Kb/min).

  • VpcInternetRx: the inbound traffic over the Internet of a VPC-connected ECS instance (Kb/min).

  • SystemDiskReadBps: the number of bytes read from the system cloud disk per second (Byte/s).

  • SystemDiskWriteBps: the number of bytes written to the system cloud disk per second (Byte/s).

  • SystemDiskReadOps: the number of read operations on the system cloud disk per second (IOPS).

  • SystemDiskWriteOps: the number of write operations on the system cloud disk per second (IOPS).

  • CpuUtilizationAgent: the CPU utilization measured by the CloudMonitor agent (%).

  • GpuUtilizationAgent: the GPU utilization measured by the CloudMonitor agent (%).

  • GpuMemoryFreeUtilizationAgent: the percentage of free GPU memory measured by the CloudMonitor agent (%).

  • GpuMemoryUtilizationAgent: the GPU memory utilization measured by the CloudMonitor agent (%).

  • MemoryUtilization: the memory utilization measured by the CloudMonitor agent (%).

  • LoadAverage: the average system load measured by the CloudMonitor agent.

  • TcpConnection: the total number of TCP connections measured by the CloudMonitor agent.

  • TcpConnection: the number of established TCP connections measured by the CloudMonitor agent.

  • PackagesNetOut: the number of packets sent by the internal network NIC per second measured by the CloudMonitor agent.

  • PackagesNetIn: the number of packets received by the internal network NIC per second measured by the CloudMonitor agent.

  • PackagesNetOut: the number of packets sent by the Internet NIC per second measured by the CloudMonitor agent.

  • PackagesNetIn: the number of packets received by the Internet NIC per second measured by the CloudMonitor agent.

  • EciPodCpuUtilization: the CPU utilization (%).

  • EciPodMemoryUtilization: the memory utilization (%).

  • LoadBalancerRealServerAverageQps: the average queries per second (QPS) per backend server in an ALB server group.

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: The alert is triggered because the alert condition is met.

  • OK: The status is normal because the alert condition is not met.

  • INSUFFICIENT_DATA: The data is insufficient to determine whether the alert condition is met.

ALARM

Period

integer

The period based on which metric data is collected. Unit: seconds. Valid values:

  • 15

  • 60

  • 120

  • 300

  • 900

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:

  • Note

    =: The metric value is greater than or equal to the threshold.

  • <=: The metric value is less than or equal to the threshold.

  • Note

    : The metric value is greater than the threshold.

  • <: The metric value is less than the threshold.

>=

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: system metrics of CloudMonitor

  • custom: custom metrics reported to CloudMonitor

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: The event-triggered task is enabled.

  • false: The event-triggered task is disabled.

true

Statistics

string

The statistical method used to collect metric data. Valid values:

  • Average: the average value

  • Minimum: the minimum value

  • Maximum: the maximum value

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:

  • user_id: the ID of your account

  • scaling_group: the monitored scaling group

  • device: the type of the NIC

  • state: the state of the TCP connection

device

DimensionValue

string

The value of the dimension associated with the metric. The valid values are determined by the dimension key.

  • user_id: automatically populated by the system.

  • scaling_group: automatically populated by the system.

  • Valid values for device:

    • eth0: For classic network instances, eth0 indicates the internal NIC. For VPC-connected instances, only the eth0 NIC exists.

    • eth1: For classic network instances, eth1 indicates the Internet NIC.

  • Valid values for state:

    • TCP_TOTAL: the total number of TCP connections.

    • ESTABLISHED: the number of established TCP connections.

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:

  • CpuUtilization: the CPU utilization of an ECS instance (%).

  • ConcurrentConnections: the number of concurrent connections to an ECS instance.

  • IntranetTx: the outbound traffic over the internal network of an ECS instance (Kb/min).

  • IntranetRx: the inbound traffic over the internal network of an ECS instance (Kb/min).

  • VpcInternetTx: the outbound traffic over the Internet of a VPC-connected ECS instance (Kb/min).

  • VpcInternetRx: the inbound traffic over the Internet of a VPC-connected ECS instance (Kb/min).

  • SystemDiskReadBps: the number of bytes read from the system cloud disk per second (Byte/s).

  • SystemDiskWriteBps: the number of bytes written to the system cloud disk per second (Byte/s).

  • SystemDiskReadOps: the number of read operations on the system cloud disk per second (IOPS).

  • SystemDiskWriteOps: the number of write operations on the system cloud disk per second (IOPS).

  • CpuUtilizationAgent: the CPU utilization measured by the CloudMonitor agent (%).

  • GpuUtilizationAgent: the GPU utilization measured by the CloudMonitor agent (%).

  • GpuMemoryFreeUtilizationAgent: the percentage of free GPU memory measured by the CloudMonitor agent (%).

  • GpuMemoryUtilizationAgent: the GPU memory utilization measured by the CloudMonitor agent (%).

  • MemoryUtilization: the memory utilization measured by the CloudMonitor agent (%).

  • LoadAverage: the average system load measured by the CloudMonitor agent.

  • TcpConnection: the total number of TCP connections measured by the CloudMonitor agent.

  • TcpConnection: the number of established TCP connections measured by the CloudMonitor agent.

  • PackagesNetOut: the number of packets sent by the internal network interface controller (NIC) per second measured by the CloudMonitor agent.

  • PackagesNetIn: the number of packets received by the internal network interface controller (NIC) per second measured by the CloudMonitor agent.

  • PackagesNetOut: the number of packets sent by the Internet network interface controller (NIC) per second measured by the CloudMonitor agent.

  • PackagesNetIn: the number of packets received by the Internet network interface controller (NIC) per second measured by the CloudMonitor agent.

  • EciPodCpuUtilization: the CPU utilization (%).

  • EciPodMemoryUtilization: the memory utilization (%).

  • LoadBalancerRealServerAverageQps: the average queries per second (QPS) per backend server in an ALB server group.

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:

  • Note

    =: The metric value is greater than or equal to the threshold.

  • <=: The metric value is less than or equal to the threshold.

  • Note

    : The metric value is greater than the threshold.

  • <: The metric value is less than the threshold.

Default value: >=.

>=

Period

integer

The period based on which metric data is collected in the multi-metric alert rule. Unit: seconds. Valid values:

  • 15

  • 60

  • 120

  • 300

  • 900

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: the average value

  • Minimum: the minimum value

  • Maximum: the maximum value

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:

  • &&: An alert is triggered only when all monitoring metrics meet the alert conditions. That is, an alert is triggered only when all expressions in the multi-metric alert rule evaluate to true.

  • ||: An alert is triggered when any one of the monitoring metrics meets the alert condition.

&&

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 +, -, *, and / operators are supported.

(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: the average value of all data points within the specified period.

  • Minimum: the minimum value of all data points within the specified period.

  • Maximum: the maximum value of all data points within the specified period.

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.