All Products
Search
Document Center

Auto Scaling:DescribeAlarms

Last Updated:May 16, 2024

Queries event-triggered tasks.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The region ID of the event-triggered task.

cn-qingdao
ScalingGroupIdstringNo

The ID of the scaling group with which the event-triggered task is associated.

asg-bp18p2yfxow2dloq****
AlarmTaskIdstringNo

The ID of the event-triggered task.

asg-bp1hvbnmkl10vll5****_f95ce797-dc2e-4bad-9618-14fee7d1****
StatestringNo

The status of the event-triggered task. Valid values:

  • ALARM: The alert condition is met and an alert is triggered.
  • OK: The alert condition is not met.
  • INSUFFICIENT_DATA: Auto Scaling cannot determine whether the alert condition is met due to insufficient data.
OK
IsEnablebooleanNo

Specifies whether to enable the event-triggered task. Valid values:

  • true: enables the event-triggered task.
  • false: disables the event-triggered task.
true
MetricTypestringNo

The type of the metric. Valid values:

  • system: system metrics of CloudMonitor
  • custom: custom metrics that are reported to CloudMonitor
true
MetricNamestringNo

The name of the event-triggered task.

CpuUtilization
PageSizeintegerNo

The number of entries to return on each page. Maximum value: 50.

Default value: 10.

10
PageNumberintegerNo

The number of the page to return. Pages start from page 1.

Default value: 1.

1

Response parameters

ParameterTypeDescriptionExample
object
PageSizeinteger

The number of entries returned per page.

10
RequestIdstring

The ID of the request.

871C7C53-34A4-45AA-8C14-4B72FA6A****
PageNumberinteger

The page number of the returned page.

1
TotalCountinteger

The total number of event-triggered tasks.

2
AlarmListobject []

The list of event-triggered tasks.

AlarmTaskIdstring

The ID of the event-triggered task.

asg-bp1hvbnmkl10vll5****_f95ce797-dc2e-4bad-9618-14fee7d1****
MetricNamestring

The name of the metric. Valid values:

  • CpuUtilization: the CPU utilization of an ECS instance. Unit: %.
  • IntranetTx: the outbound traffic over the internal network from an ECS instance. Unit: KB/min.
  • IntranetRx: the inbound traffic over the Internet to an ECS instance that resides in a VPC. Unit: KB/min.
  • VpcInternetTx: the outbound traffic over the Internet from an ECS instance that resides in a VPC. Unit: KB/min.
  • VpcInternetRx: the inbound traffic over the Internet to an ECS instance that resides in a VPC. Unit: KB/min.
  • SystemDiskReadBps: the number of bytes read from the system disk used by an ECS instance per second.
  • SystemDiskWriteBps: the number of bytes written to the system disk used by an ECS instance per second.
  • SystemDiskReadOps: the number of read operations on the system disk used by an ECS instance per second.
  • SystemDiskWriteOps: the number of write operations on the system disk used by an ECS instance per second.
  • CpuUtilizationAgent: the CPU utilization of an agent. Unit: %.
  • GpuMemoryFreeUtilizationAgent: the percentage of idle GPU memory of an agent.
  • GpuMemoryUtilizationAgent: the GPU memory usage of an agent. Unit: %.
  • MemoryUtilization: the memory usage of an agent. Unit: %.
  • LoadAverage: the average system load of an agent.
  • TcpConnection: the total number of TCP connections of an agent.
  • TcpConnection: the number of established TCP connections of an agent.
  • PackagesNetOut: the number of packets that are sent by the internal NIC used by an agent.
  • PackagesNetIn: the number of packets that are received by the internal NIC used by an agent.
  • EciPodCpuUtilization: the CPU utilization of an elastic container instance. Unit: %.
  • EciPodMemoryUtilization: the memory usage of an elastic container instance. Unit: %.

For more information, see Event-triggered task for system monitoring.

CpuUtilization
EvaluationCountinteger

The number of times that the threshold must be reached before a scaling rule can be 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 triggered.

3
Statestring

The status of the event-triggered task. Valid values:

  • ALARM: The alert condition is met and an alert is triggered.
  • OK: The alert condition is not met.
  • INSUFFICIENT_DATA: Auto Scaling cannot determine whether the alert condition is met due to insufficient data.
ALARM
Periodinteger

The period of time during which statistics about the metric is collected. Unit: seconds. Valid values:

  • 15
  • 60
  • 120
  • 300
  • 900
Note If your scaling group is of the ECS type and the event-triggered task associated with your scaling group monitors CloudMonitor metrics, you can set the Period parameter to 15. In most cases, the name of a CloudMonitor metric contains Agent.
300
ScalingGroupIdstring

The scaling group ID of the event-triggered task.

asg-bp18p2yfxow2dloq****
ComparisonOperatorstring

The operator that is used to compare the metric value and the threshold.

  • Valid value if the metric value is greater than or equal to the threshold: >=
  • Valid value if the metric value is less than or equal to the threshold: <=
  • Valid value if the metric value is greater than the threshold: >
  • Valid value if the metric value is less than the threshold: <
>=
Effectivestring
Note This parameter is in invitational preview and is unavailable.
Test
Descriptionstring

The description of the event-triggered task.

Test alarm task.
MetricTypestring

The type of the metric. Valid values:

  • system: system metrics of CloudMonitor
  • custom: custom metrics that are reported to CloudMonitor
system
Namestring

The name of the event-triggered task.

TestAlarmTask
Thresholdfloat

The threshold of the metric value. If the threshold is reached the specified times within the specified period, a scaling rule is executed.

80.0
Enableboolean

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
Statisticsstring

The method that is used to aggregate statistics for the metric. Valid values:

  • Average
  • Minimum
  • Maximum
Average
Dimensionsobject []

Details of the dimensions.

DimensionKeystring

The key of the dimension. Valid values:

  • user_id: the ID of your Alibaba Cloud account
  • scaling_group: the scaling group that you want to monitor
  • device: the type of the NIC
  • state: the state of the TCP connection
device
DimensionValuestring

The value of the dimension. The value of the DimensionValue parameter varies based on the value of the DimensionKey parameter.

  • If you set the DimensionKey parameter to user_id, the system specifies the value of the DimensionValue parameter.

  • If you set the DimensionKey parameter to scaling_group, the system specifies the value of the DimensionValue parameter.

  • If you set the DimensionKey parameter to device, you can set the DimensionValue parameter to eth0 or eth1.

    • For instances that reside in the classic network type, eth0 specifies the internal NIC. Only one eth0 NIC exists on each instance that resides in a VPC.
    • For instances that reside in the classic network, eth1 specifies the public NIC.
  • If you set the DimensionKey parameter to state, you can set the DimensionValue parameter to TCP_TOTAL or ESTABLISHED.

    • TCP_TOTAL specifies the total number of TCP connections.
    • ESTABLISHED specifies the number of established TCP connections.
eth0
AlarmActionsarray

The list of unique identifiers of the scaling rules that are associated with the event-triggered task.

string

The list of unique identifiers of the scaling rules that are associated with the event-triggered task.

ari:acs:ess:cn-hangzhou:1406926474****:scalingrule/asr-bp163l21e07uh****
Expressionsobject []

The expressions that are specified in the multi-metric alert rule.

MetricNamestring

The name of the metric that is specified in the multi-metric alert rule. Valid values:

  • CpuUtilization: the CPU utilization of an ECS instance. Unit: %.
  • IntranetTx: the outbound traffic over the internal network from an ECS instance. Unit: KB/min.
  • IntranetRx: the inbound traffic over the Internet to an ECS instance that resides in a VPC. Unit: KB/min.
  • VpcInternetTx: the outbound traffic over the Internet from an ECS instance that resides in a VPC. Unit: KB/min.
  • VpcInternetRx: the inbound traffic over the Internet to an ECS instance that resides in a VPC. Unit: KB/min.
  • SystemDiskReadBps: the number of bytes read from the system disk used by an ECS instance per second.
  • SystemDiskWriteBps: the number of bytes written to the system disk used by an ECS instance per second.
  • SystemDiskReadOps: the number of read operations on the system disk used by an ECS instance per second.
  • SystemDiskWriteOps: the number of write operations on the system disk used by an ECS instance per second.
  • CpuUtilizationAgent: the CPU utilization of an agent. Unit: %.
  • GpuUtilizationAgent: the GPU utilization of an agent. Unit: %.
  • GpuMemoryFreeUtilizationAgent: the percentage of idle GPU memory of an agent.
  • GpuMemoryUtilizationAgent: the GPU memory usage of an agent. Unit: %.
  • MemoryUtilization: the memory usage of an agent. Unit: %.
  • LoadAverage: the average system load of an agent.
  • TcpConnection: the total number of TCP connections of an agent.
  • TcpConnection: the number of established TCP connections of an agent.
  • PackagesNetOut: the number of packets that are sent by the internal NIC used by an agent.
  • PackagesNetIn: the number of packets that are received by the internal NIC used by an agent.
  • EciPodCpuUtilization: the CPU utilization of an elastic container instance. Unit: %.
  • EciPodMemoryUtilization: the memory usage of an elastic container instance. Unit: %.

For more information, see Event-triggered task for system monitoring.

CpuUtilization
ComparisonOperatorstring

The operator that is used to compare the metric value and the threshold.

  • Valid value if the metric value is greater than or equal to the threshold: >=
  • Valid value if the metric value is less than or equal to the threshold: <=
  • Valid value if the metric value is greater than the threshold: >
  • Valid value if the metric value is less than the threshold: <

Default value: >=.

>=
Periodinteger

The period of time during which statistics about the metrics in the multi-metric alert rule is collected. Unit: seconds. Valid values:

  • 15
  • 60
  • 120
  • 300
  • 900
Note If your scaling group is of the ECS type and the event-triggered task associated with your scaling group monitors CloudMonitor metrics, you can set the Period parameter to 15. In most cases, the name of a CloudMonitor metric contains Agent.
900
Statisticsstring

The method that is used to aggregate statistics about the metrics in the multi-metric alert rule. Valid values:

  • Average
  • Minimum
  • Maximum
Average
Thresholdfloat

The thresholds of the metric values in the multi-metric alert rule. If the thresholds are reached the specified number of times within the specified period, a scaling rule is executed.

40.0
ExpressionsLogicOperatorstring

The relationship between the trigger conditions that are specified in the multi-metric alert rule. Valid values:

  • &&: An alert is triggered only if all metrics in the multi-metric alert rule meet the trigger conditions. In this case, an alert is triggered only if the results of all trigger conditions that are specified in the multi-metric alert rule are true.
  • ||: An alert is triggered if one of the metrics in the multi-metric alert rule meets the trigger conditions.
&&

Examples

Sample success responses

JSONformat

{
  "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": "&&"
    }
  ]
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
No change history