All Products
Search
Document Center

Cloud Monitor:DescribeAlertingMetricRuleResources

Last Updated:Jul 09, 2026

Mengkueri daftar Sumber daya yang memicu peringatan untuk aturan peringatan tertentu.

Coba sekarang

Coba API ini di OpenAPI Explorer tanpa perlu penandatanganan manual. Panggilan yang berhasil akan secara otomatis menghasilkan contoh kode SDK sesuai dengan parameter Anda. Unduh kode tersebut dengan kredensial bawaan yang aman untuk penggunaan lokal.

Test

RAM authorization

Tabel berikut menjelaskan otorisasi yang diperlukan untuk memanggil API ini. Anda dapat menentukannya dalam kebijakan Resource Access Management (RAM). Kolom pada tabel dijelaskan sebagai berikut:

  • Action: Aksi yang dapat digunakan dalam elemen Action pada pernyataan kebijakan izin RAM untuk memberikan izin guna melakukan operasi tersebut.

  • API: API yang dapat Anda panggil untuk melakukan aksi tersebut.

  • Access level: Tingkat akses yang telah ditentukan untuk setiap API. Nilai yang valid: create, list, get, update, dan delete.

  • Resource type: Jenis resource yang mendukung otorisasi untuk melakukan aksi tersebut. Ini menunjukkan apakah aksi tersebut mendukung izin tingkat resource. Resource yang ditentukan harus kompatibel dengan aksi tersebut. Jika tidak, kebijakan tersebut tidak akan berlaku.

    • Untuk API dengan izin tingkat resource, jenis resource yang diperlukan ditandai dengan tanda bintang (*). Tentukan Nama Sumber Daya Alibaba Cloud (ARN) yang sesuai dalam elemen Resource pada kebijakan.

    • Untuk API tanpa izin tingkat resource, ditampilkan sebagai All Resources. Gunakan tanda bintang (*) dalam elemen Resource pada kebijakan.

  • Condition key: Kunci kondisi yang didefinisikan oleh layanan. Kunci ini memungkinkan kontrol granular, berlaku baik hanya untuk aksi maupun untuk aksi yang terkait dengan resource tertentu. Selain kunci kondisi spesifik layanan, Alibaba Cloud menyediakan serangkaian common condition keys yang berlaku di semua layanan yang didukung RAM.

  • Dependent action: Aksi dependen yang diperlukan untuk menjalankan aksi tersebut. Untuk menyelesaikan aksi tersebut, pengguna RAM atau role RAM harus memiliki izin untuk melakukan semua aksi dependen.

Action

Access level

Resource type

Condition key

Dependent action

cms:DescribeAlertingMetricRuleResources

get

*全部资源

*

None None

Parameter permintaan

Parameter

Type

Required

Description

Example

RuleId

string

No

ID aturan peringatan. Untuk informasi tentang cara mengkueri ID aturan peringatan, lihat DescribeMetricRuleList.

putNewAlarm_user_7e78d765-0e3e-4671-ba6d-7ce39108****

GroupId

string

No

ID kelompok aplikasi. Untuk informasi tentang cara mengkueri ID kelompok aplikasi, lihat DescribeMonitorGroups.

7671****

Page

integer

No

Nomor halaman.

Nilai default: 1.

1

PageSize

integer

No

Jumlah entri per halaman.

Nilai default: 10.

10

Namespace

string

No

Namespace data layanan cloud.

Untuk informasi tentang cara mendapatkan namespace data layanan cloud, lihat Metrik pemantauan layanan cloud.

acs_mns_new

Dimensions

string

No

Peta dimensi yang digunakan untuk mengkueri data pemantauan untuk Sumber daya tertentu.

{\"userId\":\"120886317861****\",\"region\":\"cn-huhehaote\",\"queue\":\"test-0128\"}

AlertBeforeTime

string

No

Mengkueri peringatan yang terjadi sebelum pengatur waktu ini. Nilainya adalah timestamp tingkat milidetik.

1698827400000

Untuk informasi lebih lanjut tentang parameter permintaan umum, lihat Parameter umum.

Elemen respons

Element

Type

Description

Example

object

Tidak ada.

Code

integer

Kode status.

Catatan

Nilai 200 menunjukkan keberhasilan.

200

Message

string

Paket error.

The request processing has failed due to some unknown error.

RequestId

string

ID permintaan.

0724011B-D9E0-4B2F-8C51-F17A894CC42C

Total

integer

Jumlah total rekaman.

2

Success

boolean

Apakah operasi berhasil. Nilai valid:

  • true: Operasi berhasil.

  • false: Operasi gagal.

true

Resources

object

Resource

array<object>

Daftar Sumber daya yang terkait dengan aturan peringatan.

array<object>

Tidak ada.

MetricName

string

The metric name.

ActiveMessages

RetryTimes

string

The consecutive number of times for which the metric value meets the alert condition before an alert is triggered.

3

MetricValues

string

The metric value that triggered the alert based on the alert rule. The value is a JSON string.

{\"timestamp\":1623727500000,\"Sum\":926,\"value\":463,\"Maximum\":463,\"Minimum\":463,\"Average\":463,\"SampleCount\":2,\"userId\":\"120886317861****\",\"region\":\"cn-huhehaote\",\"queue\":\"test-0128\"}

Namespace

string

The namespace of the cloud service.

acs_mns_new

RuleName

string

The name of the alert rule.

test123456789

RuleId

string

The ID of the alert rule.

putNewAlarm_user_7e78d765-0e3e-4671-ba6d-7ce39108****

ProductCategory

string

The type of the cloud service.

mns

StartTime

string

The time when the resource was associated with the alert rule. The value is a timestamp.

Unit: milliseconds.

1622427900000

Resource

string

The resources that are monitored.

userId=120886317861****,region=cn-huhehaote,queue=test-0128

LastModifyTime

string

The time when the alert rule was last modified. The value is a timestamp.

Unit: milliseconds.

1622827900000

GroupId

string

The ID of the application group.

Catatan

If the alert rule is associated with an application group, the ID of the application group is returned in this parameter.

7671****

Dimensions

string

The dimensions based on which the resources are queried.

{\"region\":\"cn-huhehaote\",\"queue\":\"test-0128\",\"userId\":\"120886317861****\"}

LastAlertTime

string

The time when the last alert was triggered for the resource based on the alert rule. The value is a timestamp.

Unit: milliseconds.

1622427900000

Level

integer

The severity level and notification methods of the alert. Valid values:

  • 4: Alert notifications are sent by using emails and DingTalk chatbots.

  • OK: No alert is generated.

3

Threshold

string

The alert threshold.

10

Statistics

string

The method used to calculate the metric values that trigger alerts.

Average

Enable

string

Indicates whether the alert rule is enabled. Valid values:

  • true: The alert rule is enabled.

  • false: The alert rule is disabled.

true

Escalation

object

Resource

array<object>

The alert rule based on which the alert is triggered.

array<object>

None

ComparisonOperator

string

The operator that is used to compare the metric value with the threshold. Valid values:

  • GreaterThanOrEqualToThreshold: greater than or equal to the threshold

  • GreaterThanThreshold: greater than the threshold

  • LessThanOrEqualToThreshold: less than or equal to the threshold

  • LessThanThreshold: less than the threshold

  • NotEqualToThreshold: not equal to the threshold

  • GreaterThanYesterday: greater than the metric value at the same time yesterday

  • LessThanYesterday: less than the metric value at the same time yesterday

  • GreaterThanLastWeek: greater than the metric value at the same time last week

  • LessThanLastWeek: less than the metric value at the same time last week

  • GreaterThanLastPeriod: greater than the metric value in the last monitoring cycle

  • LessThanLastPeriod: less than the metric value in the last monitoring cycle

GreaterThanOrEqualToThreshold

PreCondition

string

The operator that is used to compare the metric value with the threshold. Valid values:

  • >=

  • =

  • <=

  • >

  • <

  • !=

>=

Expression

string

The description of the alert rule.

Catatan

This parameter indicates the content of the alert rule. If the metric value meets the alert condition, an alert is triggered.

$Average>=10

Times

integer

The consecutive number of times for which the metric value meets the alert condition before an alert is triggered.

1

Tag

string

This parameter is deprecated.

Threshold

string

The alert threshold.

10

Level

integer

The severity level and notification methods of the alert. Valid values:

  • 4: Alert notifications are sent by using emails and DingTalk chatbots.

  • OK: No alert is generated.

3

ExpressionListJoin

string

The relationship between multiple metrics. Valid values:

  • &&: If all metrics meet the alert conditions, CloudMonitor sends alert notifications.

  • ||: If one of the metrics meets the alert conditions, CloudMonitor sends alert notifications.

&&

ExpressionList

object

ExpressionList

array<object>

The description of the multi-metric alert rule.

object

None

ComparisonOperator

string

The operator that is used to compare the metric value with the threshold. Valid values:

  • GreaterThanOrEqualToThreshold: greater than or equal to the threshold

  • GreaterThanThreshold: greater than the threshold

  • LessThanOrEqualToThreshold: less than or equal to the threshold

  • LessThanThreshold: less than the threshold

  • NotEqualToThreshold: not equal to the threshold

  • GreaterThanYesterday: greater than the metric value at the same time yesterday

  • LessThanYesterday: less than the metric value at the same time yesterday

  • GreaterThanLastWeek: greater than the metric value at the same time last week

  • LessThanLastWeek: less than the metric value at the same time last week

  • GreaterThanLastPeriod: greater than the metric value in the last monitoring cycle

  • LessThanLastPeriod: less than the metric value in the last monitoring cycle

GreaterThanOrEqualToThreshold

MetricName

string

The metric name.

cpu_total

Period

string

The statistical period of the metric. Unit: seconds. The default value is the interval at which the monitoring data of the metric is collected.

60

Statistics

string

The statistical method of the alert level. Valid values:

  • Maximum

  • Minimum

  • Average

Average

Threshold

string

The alert threshold.

90

ExpressionRaw

string

The trigger conditions that are created by using expressions. You can use expressions to create trigger conditions in the following scenarios:

  • Set an alert blacklist for specific resources. For example, if you specify $instanceId != 'i-io8kfvcpp7x5****' ``&&`` $Average > 50, no alert is triggered when the average metric value of the i-io8kfvcpp7x5**** instance exceeds 50.

  • Set a special alert threshold for a specified instance in the rule. For example, if you specify $Average > ($instanceId == 'i-io8kfvcpp7x5****'? 80: 50), an alert is triggered when the average metric value of the i-io8kfvcpp7x5**** instance exceeds 80 or the average metric value of other instances exceeds 50.

  • Limit the number of instances whose metric values exceed the threshold. For example, if you specify count($Average > 20) > 3, an alert is triggered only when the average metric value of more than three instances exceeds 20.

$Average > ($instanceId == 'i-io8kfvcpp7x5****'? 80: 50)

Contoh

Respons sukses

JSONformat

{
  "Code": 200,
  "Message": "The request processing has failed due to some unknown error.",
  "RequestId": "0724011B-D9E0-4B2F-8C51-F17A894CC42C",
  "Total": 2,
  "Success": true,
  "Resources": {
    "Resource": [
      {
        "MetricName": "ActiveMessages",
        "RetryTimes": "3",
        "MetricValues": "{\\\"timestamp\\\":1623727500000,\\\"Sum\\\":926,\\\"value\\\":463,\\\"Maximum\\\":463,\\\"Minimum\\\":463,\\\"Average\\\":463,\\\"SampleCount\\\":2,\\\"userId\\\":\\\"120886317861****\\\",\\\"region\\\":\\\"cn-huhehaote\\\",\\\"queue\\\":\\\"test-0128\\\"}",
        "Namespace": "acs_mns_new",
        "RuleName": "test123456789",
        "RuleId": "putNewAlarm_user_7e78d765-0e3e-4671-ba6d-7ce39108****",
        "ProductCategory": "mns",
        "StartTime": "1622427900000",
        "Resource": "userId=120886317861****,region=cn-huhehaote,queue=test-0128",
        "LastModifyTime": "1622827900000",
        "GroupId": "7671****",
        "Dimensions": "{\\\"region\\\":\\\"cn-huhehaote\\\",\\\"queue\\\":\\\"test-0128\\\",\\\"userId\\\":\\\"120886317861****\\\"}",
        "LastAlertTime": "1622427900000",
        "Level": 3,
        "Threshold": "10",
        "Statistics": "Average",
        "Enable": "true",
        "Escalation": {
          "Resource": [
            {
              "ComparisonOperator": "GreaterThanOrEqualToThreshold",
              "PreCondition": ">=",
              "Expression": "$Average>=10",
              "Times": 1,
              "Tag": "无",
              "Threshold": "10",
              "Level": 3,
              "ExpressionListJoin": "&&",
              "ExpressionList": {
                "ExpressionList": [
                  {
                    "ComparisonOperator": "GreaterThanOrEqualToThreshold",
                    "MetricName": "cpu_total",
                    "Period": "60",
                    "Statistics": "Average",
                    "Threshold": "90"
                  }
                ]
              },
              "ExpressionRaw": "$Average > ($instanceId == 'i-io8kfvcpp7x5****'? 80: 50)"
            }
          ]
        }
      }
    ]
  }
}

Kode kesalahan

HTTP status code

Error code

Error message

Description

400 %s %s
500 %s %s
500 InternalError The request processing has failed due to some unknown error.
403 %s %s
404 %s %s
503 %s %s

Lihat Error Codes untuk daftar lengkap.

Catatan rilis

Lihat Release Notes untuk daftar lengkap.