All Products
Search
Document Center

Cloud Monitor:DescribeAlertLogList

Last Updated:Jun 11, 2026

Mengkueri riwayat peringatan dengan memanggil operasi DescribeAlertLogList.

Deskripsi operasi

This operation can query the alert history only within the last year.

This topic provides an example to show how to query the alert history of Elastic Compute Service (ECS) from the cloud service product dimension.

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:DescribeAlertLogList

get

*All Resource

*

None None

Parameter permintaan

Parameter

Type

Required

Description

Example

StartTime

integer

No

Awal pengatur waktu untuk mengkueri riwayat peringatan.

Unit: milidetik.

Anda hanya dapat mengkueri riwayat peringatan dalam satu tahun terakhir. Jika pengatur waktu kueri melebihi satu tahun, nilai kembali parameter AlertLogList akan kosong.

Catatan

Selang waktu antara waktu mulai (StartTime) dan waktu akhir (EndTime) harus kurang dari atau sama dengan 15 hari. Kedua parameter harus ditentukan atau tidak ditentukan secara bersamaan. Jika tidak ditentukan, riwayat peringatan dalam 15 menit terakhir akan dikueri secara default.

1609988009694

EndTime

integer

No

Akhir pengatur waktu untuk mengkueri riwayat peringatan.

Unit: milidetik.

Anda hanya dapat mengkueri riwayat peringatan dalam satu tahun terakhir. Jika pengatur waktu kueri melebihi satu tahun, nilai kembali parameter AlertLogList akan kosong.

Catatan

Selang waktu antara waktu mulai (StartTime) dan waktu akhir (EndTime) harus kurang dari atau sama dengan 15 hari. Kedua parameter harus ditentukan atau tidak ditentukan secara bersamaan. Jika tidak ditentukan, riwayat peringatan dalam 15 menit terakhir akan dikueri secara default.

1610074409694

PageNumber

integer

No

Nomor halaman.

Nilai default: 1.

1

PageSize

integer

No

Jumlah entri per halaman.

Nilai default: 10.

10

SearchKey

string

No

Kata kunci yang digunakan untuk mengkueri riwayat peringatan.

alert

GroupId

string

No

ID kelompok aplikasi.

7301****

Namespace

string

No

Namespace layanan cloud.

Catatan

Untuk informasi selengkapnya tentang namespace layanan cloud, lihat Metrics.

acs_ecs_dashboard

Product

string

No

Singkatan nama layanan cloud.

Untuk informasi selengkapnya tentang cara mendapatkan singkatan nama layanan cloud, lihat DescribeProductsOfActiveMetricRule.

ECS

Level

string

No

Tingkat peringatan dan metode Notifikasi. Nilai valid:

  • P4: email dan chatbot DingTalk.

  • OK: tidak ada peringatan.

  • .

P4

SendStatus

string

No

Status peringatan. Nilai valid:

  • 0: Peringatan dipicu atau dihapus.

  • 1: Pengatur waktu saat ini tidak berada dalam periode efektif peringatan.

  • 2: Pengatur waktu saat ini berada dalam periode senyap saluran.

  • 3: Host sedang dimulai ulang.

  • 4: Tidak ada peringatan yang dikirim.

Ketika status peringatan adalah 0, peringatan dipicu jika Level diatur ke P4; peringatan dihapus jika Level diatur ke OK. .

0

ContactGroup

string

No

Kelompok kontak peringatan.

ECS_Group

RuleName

string

No

Nama aturan peringatan.

test123

MetricName

string

No

Nama metrik.

Catatan

Untuk informasi selengkapnya tentang metrik layanan cloud, lihat Metrics.

IntranetInRate

LastMin

string

No

Interval pengambilan log. Unit: menit.

360

GroupBy

string

No

Dimensi spasial tempat data diagregasi, yang setara dengan Group By di SQL. Nilai valid:

  • product: mengagregasi data berdasarkan layanan cloud.

  • level: mengagregasi data berdasarkan tingkat peringatan.

  • groupId: mengagregasi data berdasarkan kelompok aplikasi.

  • contactGroup: mengagregasi data berdasarkan kelompok kontak peringatan.

  • product,metricName: mengagregasi data berdasarkan layanan cloud dan metrik.

product

RuleId

string

No

ID aturan peringatan.

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

bc369e8_30f87e517ed2fc****

SourceType

string

No

Tipe aturan peringatan. Nilai valid: METRIC, yang menunjukkan aturan peringatan metrik pengatur waktu.

METRIC

EventType

string

No

Tipe peringatan. Nilai valid:

  • TRIGGERED: Peringatan dipicu.

  • RESOLVED: Peringatan dihapus.

TRIGGERED

Untuk informasi selengkapnya tentang parameter permintaan umum, lihat Common parameters.

Elemen respons

Element

Type

Description

Example

object

None.

RequestId

string

The request ID.

1C4A3709-BF52-42EE-87B5-7435F0929585

Success

boolean

Indicates whether the call was successful. Valid values:

  • true: The call was successful.

  • false: The call failed.

true

Code

string

The HTTP status code.

Catatan

The status code 200 indicates that the call was successful.

200

Message

string

The error message.

The specified resource is not found.

PageNumber

integer

The page number.

1

PageSize

integer

The number of entries per page.

10

AlertLogList

array<object>

The list of alert history entries.

array<object>

None.

MetricName

string

The name of the metric.

cpu_total

EventName

string

The name of the event.

IOHang

Product

string

The cloud service identifier. Valid values:

  • For an Alibaba Cloud service, the value is the abbreviation of the cloud service name. Example: ECS.

  • For a non-Alibaba Cloud service, the value is in the format of acs_Product keyword. Example: acs_networkmonitor.

ECS

BlackListUUID

string

The UUID of the matched alert blacklist.

8410dbbd-7d30-41c5-94cb-****

Message

string

The alert-related information, which is a JSON string.

{"alertName":"e47aa0ac-4076-44db-a47d-d1083968****_Availability"}

Namespace

string

The namespace of the cloud service.

acs_ecs_dashboard

LevelChange

string

The change of the alert level. Valid values:

  • P4->OK: The alert level changes from P4 to OK, which indicates that the alert is cleared.

  • P4->P4: indicates a P4-level alert.

P4->OK

InstanceId

string

The ID of the resource.

i-m5e1qg6uo38rztr4****

RuleName

string

The name of the alert rule.

CPU Utilization

RuleId

string

The ID of the alert rule.

d582b9e9-b1c1-4f17-9279-0fe7333a****_ResponseTime

BlackListName

string

The name of the matched alert blacklist.

Black_Test

GroupName

string

The name of the application group.

ECS_Instances

GroupId

string

The ID of the application group.

7301****

AlertTime

string

The timestamp when the alert was triggered.

Unit: milliseconds.

1610043776621

InstanceName

string

The name of the resource.

portalHost

BlackListDetail

string

The details of the matched alert blacklist.

{"id":12****,"metricProject":"acs_ecs_dashboard","userId":173651113438****,"uuid":"8410dbbd-7d30-41c5-94cb-****","name":"alert-****","productCategory":"ecs","instances":[{"instanceId":"i-m5e1qg6uo38rztr4****"}],"metrics":null,"scopeType":"USER","scopeValue":"","startTime":"0001-01-01T00:00:00Z","endTime":"9999-12-31T23:59:59.999999999+08:00","effectiveTime":null,"isEnable":true,"status":1,"gmtCreate":"2021-11-02T16:35:59+08:00","gmtModified":"2021-11-02T16:35:59+08:00","loadTime":"2021-11-02T16:36:15.213072177+08:00"}

Level

string

The alert level and notification methods. Valid values:

  • P4: emails and DingTalk chatbots.

  • OK: no alerts.

P4

SendStatus

string

The alert status. Valid values:

  • 0: An alert is triggered or cleared.

  • 1: The current time is not within the effective period of the alert.

  • 2: The current time is within the channel silence period.

  • 3: The host is being restarted.

  • 4: No alerts are sent.

When the alert status is 0, an alert is triggered if Level is set to P4; the alert is cleared if Level is set to OK.

0

ExtendedInfo

array<object>

The extended information of the alert.

object

None.

Name

string

The name of the extended field.

userId

Value

string

The value of the extended field.

100931896542****

Dimensions

array<object>

The dimensions of the resource for which the alert is triggered.

object

None.

Key

string

The key of the dimension.

instanceId

Value

string

The value of the dimension.

i-m5e1qg6uo38rztr4****

WebhookList

array<object>

The list of URLs that are called back when the alert is triggered.

object

None.

code

string

The status code of the alert callback.

200

url

string

The callback URL.

https://www.aliyun.com/webhook.html

message

string

The message returned for the alert callback.

success

DingdingWebhookList

array

The list of webhook URLs of DingTalk chatbots for the alert contact.

string

The list of webhook URLs of DingTalk chatbots for the alert contact.

https://oapi.dingtalk.com/robot/send?access_token=b7ff24032da1a5f86659ecda46797e13cc1d4e4da6903d7b014ea1d1488b****

ContactOnCallList

array

The list of phone numbers of the alert contact.

string

The list of phone numbers of the alert contact.

Catatan

This parameter is applicable only to the China site.

1368888****

ContactMailList

array

The list of email addresses of the alert contact.

string

The list of email addresses of the alert contact.

username@example.com

ContactGroups

array

The list of alert contact groups.

string

The alert contact group.

ECS_Group

ContactALIIWWList

array

The list of Wangwang IDs of the alert contact.

string

The list of Wangwang IDs of the alert contact.

Catatan

This parameter is applicable only to the China site.

Alice

ContactSMSList

array

The list of phone numbers that receive text messages of the alert contact.

string

The list of phone numbers that receive text messages of the alert contact.

Catatan

This parameter is applicable only to the China site.

1368888****

ContactDingList

array

The list of DingTalk accounts of the alert contact.

string

The list of DingTalk accounts of the alert contact.

CloudMonitor

SendDetail

object

The details of the alert pushing result.

ResultCode

string

The status of the alert notification.

  • success: The notification is sent.

  • Error code: If an error occurs in the configuration, no notification is sent and an error code is returned.

success

ChannelResultList

array<object>

The list of alert notifications that are sent through each channel.

array<object>

The results of the alert notifications that are sent through each channel.

Channel

string

The channel to which the alert notification is sent. Valid values:

  • MAIL: email

  • SMS: text message

  • WEBHOOK: webhook

  • SLS: Simple Log Service

  • ONCALL: phone call

  • FC: Function Compute

  • MNS: Message Service (MNS)

MAIL

ResultList

array<object>

The list of results of the alert notifications that are sent through the channel.

object

The result of the alert notification that is sent through the channel.

Code

string

The status code.

  • If Channel is set to WEBHOOK, the status code is 200 or 500.

  • If Channel is set to MAIL, SMS, SLS, ONCALL, FC, or MNS, this parameter is not returned or is empty.

200

RequestId

string

The ID of the request that is sent to another cloud service.

0BDAF8A8-04DC-5F0C-90E4-724D42C4****

Success

boolean

The result of the call.

  • true: The call is successful.

  • false: The call fails.

true

Detail

string

The details of the returned result.

{ }

notifyTargetList

array

The list of notification channels.

string

The list of notification channels.

MAIL

Escalation

object

The rule that triggers the alert.

Expression

string

The description of the alert rule.

Catatan

This is the condition for triggering the alert rule. An alert is triggered if the monitoring data meets the condition.

$Average<90

Times

integer

The number of retries.

1

Level

string

The alert level and notification methods. Valid values:

  • P2: phone call, text message, email, and DingTalk chatbot.

  • P3: text message, email, and DingTalk chatbot.

P4

SendResultList

array<object>

The list of alert sending results.

object

The list of alert sending results.

Key

string

The channel to which the alert notification is sent. Valid values:

  • MAIL: email

  • ALIIM: TradeManager

  • SMS: text message

  • CALL: phone call

  • DING: DingTalk chatbot

  • Merged: merged alert

MAIL

Value

array

The notification object.

string

The notification object.

username@example.com

LogId

string

The log ID.

7510****::e8a472a0-46ae-4ac0-84b1-e46be368****

Contoh

Respons sukses

JSONformat

{
  "RequestId": "1C4A3709-BF52-42EE-87B5-7435F0929585",
  "Success": true,
  "Code": "200",
  "Message": "The specified resource is not found.",
  "PageNumber": 1,
  "PageSize": 10,
  "AlertLogList": [
    {
      "MetricName": "cpu_total",
      "EventName": "IOHang",
      "Product": "ECS",
      "BlackListUUID": "8410dbbd-7d30-41c5-94cb-****",
      "Message": "{\"alertName\":\"e47aa0ac-4076-44db-a47d-d1083968****_Availability\"}",
      "Namespace": "acs_ecs_dashboard",
      "LevelChange": "P4->OK",
      "InstanceId": "i-m5e1qg6uo38rztr4****",
      "RuleName": "CPU Utilization",
      "RuleId": "d582b9e9-b1c1-4f17-9279-0fe7333a****_ResponseTime",
      "BlackListName": "Black_Test",
      "GroupName": "ECS_Instances",
      "GroupId": "7301****",
      "AlertTime": "1610043776621",
      "InstanceName": "portalHost",
      "BlackListDetail": "{\"id\":12****,\"metricProject\":\"acs_ecs_dashboard\",\"userId\":173651113438****,\"uuid\":\"8410dbbd-7d30-41c5-94cb-****\",\"name\":\"alert-****\",\"productCategory\":\"ecs\",\"instances\":[{\"instanceId\":\"i-m5e1qg6uo38rztr4****\"}],\"metrics\":null,\"scopeType\":\"USER\",\"scopeValue\":\"\",\"startTime\":\"0001-01-01T00:00:00Z\",\"endTime\":\"9999-12-31T23:59:59.999999999+08:00\",\"effectiveTime\":null,\"isEnable\":true,\"status\":1,\"gmtCreate\":\"2021-11-02T16:35:59+08:00\",\"gmtModified\":\"2021-11-02T16:35:59+08:00\",\"loadTime\":\"2021-11-02T16:36:15.213072177+08:00\"}",
      "Level": "P4",
      "SendStatus": "0",
      "ExtendedInfo": [
        {
          "Name": "userId",
          "Value": "100931896542****"
        }
      ],
      "Dimensions": [
        {
          "Key": "instanceId",
          "Value": "i-m5e1qg6uo38rztr4****"
        }
      ],
      "WebhookList": [
        {
          "code": "200",
          "url": "https://www.aliyun.com/webhook.html",
          "message": "success"
        }
      ],
      "DingdingWebhookList": [
        "https://oapi.dingtalk.com/robot/send?access_token=b7ff24032da1a5f86659ecda46797e13cc1d4e4da6903d7b014ea1d1488b****"
      ],
      "ContactOnCallList": [
        "1368888****"
      ],
      "ContactMailList": [
        "username@example.com"
      ],
      "ContactGroups": [
        "ECS_Group"
      ],
      "ContactALIIWWList": [
        "Alice"
      ],
      "ContactSMSList": [
        "1368888****"
      ],
      "ContactDingList": [
        "CloudMonitor"
      ],
      "SendDetail": {
        "ResultCode": "success",
        "ChannelResultList": [
          {
            "Channel": "MAIL",
            "ResultList": [
              {
                "Code": "200",
                "RequestId": "0BDAF8A8-04DC-5F0C-90E4-724D42C4****",
                "Success": true,
                "Detail": "{ }",
                "notifyTargetList": [
                  "MAIL"
                ]
              }
            ]
          }
        ]
      },
      "Escalation": {
        "Expression": "$Average<90",
        "Times": 1,
        "Level": "P4"
      },
      "SendResultList": [
        {
          "Key": "MAIL",
          "Value": [
            "username@example.com"
          ]
        }
      ],
      "LogId": "7510****::e8a472a0-46ae-4ac0-84b1-e46be368****"
    }
  ]
}

Kode kesalahan

HTTP status code

Error code

Error message

Description

400 ParameterInvalid Parameter invalid.
500 InternalError The request processing has failed due to some unknown error.
403 AccessForbidden User not authorized to operate on the specified resource.
404 ResourceNotFound The specified resource is not found. The specified resource is not found.
409 ResourceConflict Concurrent modification of resources.
409 ResourceExist Resources already exist.

Lihat Error Codes untuk daftar lengkap.

Catatan rilis

Lihat Release Notes untuk daftar lengkap.