すべてのプロダクト
Search
ドキュメントセンター

Cloud Monitor:DescribeAlertLogList

最終更新日:Jun 11, 2026

DescribeAlertLogList 操作を呼び出して、アラート履歴を照会します。

操作説明

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.

今すぐお試しください

この API を OpenAPI Explorer でお試しください。手作業による署名は必要ありません。呼び出しに成功すると、入力したパラメーターに基づき、資格情報が組み込まれた SDK コードが自動的に生成されます。このコードをダウンロードしてローカルで使用できます。

テスト

RAM 認証

下表に、この API を呼び出すために必要な認証情報を示します。認証情報は、RAM (Resource Access Management) ポリシーを使用して定義できます。以下で各列名について説明します。

  • アクション:特定のリソースに対して実行可能な操作。ポリシー構文ではAction要素として指定します。

  • API:アクションを具体的に実行するための API。

  • アクセスレベル:各 API に対して事前定義されているアクセスの種類。有効な値:create、list、get、update、delete。

  • リソースタイプ:アクションが作用するリソースの種類。リソースレベルでの権限をサポートするかどうかを示すことができます。ポリシーの有効性を確保するため、アクションの対象として適切なリソースを指定してください。

    • リソースレベルの権限を持つ API の場合、必要なリソースタイプはアスタリスク (*) でマークされます。ポリシーのResource要素で対応する ARN を指定してください。

    • リソースレベルの権限を持たない API の場合、「すべてのリソース」と表示され、ポリシーのResource要素でアスタリスク (*) でマークされます。

  • 条件キー:サービスによって定義された条件のキー。このキーにより、きめ細やかなアクセス制御が可能になります。この制御は、アクション単体に適用することも、特定のリソースに対するアクションに適用することもできます。Alibaba Cloud は、サービス固有の条件キーに加えて、すべての RAM 統合サービスに適用可能な一連の共通条件キーを提供しています。

  • 依存アクション:ある特定のアクションを実行するために、前提として実行が必要となる他のアクション。依存アクションの権限も RAM ユーザーまたは RAM ロールに付与する必要があります。

アクション

アクセスレベル

リソースタイプ

条件キー

依存アクション

cms:DescribeAlertLogList

get

*All Resource

*

なし なし

リクエストパラメーター

パラメーター

必須 / 任意

説明

StartTime

integer

任意

アラート履歴を照会する時間範囲の開始時刻。

単位: ミリ秒。

過去 1 年以内のアラート履歴のみを照会できます。クエリの時間範囲が 1 年を超える場合、AlertLogList パラメーターの戻り値は空になります。

説明

開始時刻 (StartTime) と終了時刻 (EndTime) の間隔は 15 日以下である必要があります。両方のパラメーターを同時に指定するか、同時に未指定にする必要があります。指定しない場合、デフォルトで過去 15 分間のアラート履歴が照会されます。

1609988009694

EndTime

integer

任意

アラート履歴を照会する時間範囲の終了時刻。

単位: ミリ秒。

過去 1 年以内のアラート履歴のみを照会できます。クエリの時間範囲が 1 年を超える場合、AlertLogList パラメーターの戻り値は空になります。

説明

開始時刻 (StartTime) と終了時刻 (EndTime) の間隔は 15 日以下である必要があります。両方のパラメーターを同時に指定するか、同時に未指定にする必要があります。指定しない場合、デフォルトで過去 15 分間のアラート履歴が照会されます。

1610074409694

PageNumber

integer

任意

ページ番号。

デフォルト値: 1。

1

PageSize

integer

任意

1 ページあたりのエントリ数。

デフォルト値: 10。

10

SearchKey

string

任意

アラート履歴をクエリするために使用されるキーワード。

alert

GroupId

string

任意

アプリケーショングループの ID。

7301****

Namespace

string

任意

クラウドサービスの名前空間。

説明

クラウドサービスの名前空間の詳細については、メトリックを参照してください。

acs_ecs_dashboard

Product

string

任意

クラウドサービス名の略称。

クラウドサービス名の略称の取得方法の詳細については、 DescribeProductsOfActiveMetricRule を参照してください。

ECS

Level

string

任意

アラートレベルと通知方法。有効な値:

  • P4: メールと DingTalk チャットボット。

  • OK: アラートなし。

P4

SendStatus

string

任意

アラートステータス。有効な値:

  • 0: アラートがトリガーまたはクリアされました。

  • 1: 現在の時間がアラートの有効期間内ではありません。

  • 2: 現在の時間がチャンネルサイレンス期間内です。

  • 3: ホストが再起動中です。

  • 4: アラートは送信されません。

アラートステータスが 0 の場合、Level が P4 に設定されているとアラートがトリガーされ、Level が OK に設定されているとアラートがクリアされます。

0

ContactGroup

string

任意

アラート連絡先グループ。

ECS_Group

RuleName

string

任意

アラートルールの名前。

test123

MetricName

string

任意

メトリックの名前。

説明

クラウドサービスのメトリックの詳細については、メトリックを参照してください。

IntranetInRate

LastMin

string

任意

ログを取得する間隔。単位: 分。

360

GroupBy

string

任意

データを集計する空間ディメンション。SQL の Group By に相当します。有効な値:

  • product: プロダクトごとにデータを集計します。

  • level: アラートレベルごとにデータを集計します。

  • groupId: アプリケーショングループごとにデータを集計します。

  • contactGroup: アラート連絡先グループごとにデータを集計します。

  • product,metricName: プロダクトとメトリックごとにデータを集計します。

product

RuleId

string

任意

アラートルールの ID。

アラートルールの ID のクエリ方法の詳細については、 DescribeMetricRuleList を参照してください。

bc369e8_30f87e517ed2fc****

SourceType

string

任意

アラートルールのタイプ。有効な値: METRIC (時系列メトリックアラートルールを示します)。

METRIC

EventType

string

任意

アラートタイプ。有効な値:

  • TRIGGERED: アラートがトリガーされました。

  • RESOLVED: アラートがクリアされました。

TRIGGERED

共通リクエストパラメーターの詳細については、共通パラメーターを参照してください。

レスポンスフィールド

フィールド

説明

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.

説明

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

拡張フィールドの名前。

userId

Value

string

拡張フィールドの値。

100931896542****

Dimensions

array<object>

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

object

None.

Key

string

ディメンションのキー。

instanceId

Value

string

ディメンションの値。

i-m5e1qg6uo38rztr4****

WebhookList

array<object>

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

object

None.

code

string

アラートコールバックのステータスコード。

200

url

string

コールバック URL。

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

message

string

アラートコールバックに対して返されたメッセージ。

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.

説明

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.

説明

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.

説明

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

アラート通知のステータス。

  • success: 通知は送信されます。

  • エラーコード: 構成でエラーが発生した場合、通知は送信されず、エラーコードが返されます。

success

ChannelResultList

array<object>

各チャンネルを通じて送信されるアラート通知のリスト。

array<object>

各チャンネルを通じて送信されるアラート通知の結果。

Channel

string

アラート通知の送信先チャンネル。有効な値:

  • MAIL: メール

  • SMS: ショートメッセージ

  • WEBHOOK: Webhook

  • SLS: Simple Log Service

  • ONCALL: 電話

  • FC: Function Compute

  • MNS: Message Service (MNS)

MAIL

ResultList

array<object>

チャンネルを通じて送信されるアラート通知の結果のリスト。

object

チャンネルを通じて送信されるアラート通知の結果。

Code

string

状態コード。

  • ChannelWEBHOOK に設定されている場合、ステータスコードは 200 または 500 です。

  • ChannelMAILSMSSLSONCALLFC、または MNS に設定されている場合、このパラメーターは返されないか、空です。

200

RequestId

string

別のクラウドサービスに送信されるリクエストの ID。

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

Success

boolean

呼び出しの結果。

  • true: 呼び出しは成功です。

  • false: 呼び出しは失敗です。

true

Detail

string

返された結果の詳細。

{ }

notifyTargetList

array

通知チャンネルのリスト。

string

通知チャンネルのリスト。

MAIL

Escalation

object

The rule that triggers the alert.

Expression

string

アラー​​トルールの説明。

説明

これは、アラー​​トルールをトリガーするための条件です。モニタリングデータが条件を満たすと、アラートがトリガーされます。

$Average<90

Times

integer

再試行回数。

1

Level

string

アラートレベルと通知方法。有効な値:

  • P2: 電話、ショートメッセージ、メール、および DingTalk チャットボット。

  • P3: ショートメッセージ、メール、および DingTalk チャットボット。

P4

SendResultList

array<object>

The list of alert sending results.

object

The list of alert sending results.

Key

string

アラート通知の送信先チャンネル。有効な値:

  • MAIL: メール

  • ALIIM: TradeManager

  • SMS: ショートメッセージ

  • CALL: 電話

  • DING: DingTalk チャットボット

  • Merged: マージされたアラート

MAIL

Value

array

通知オブジェクト。

string

通知オブジェクト。

username@example.com

LogId

string

The log ID.

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

成功レスポンス

JSONJSON

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

エラーコード

HTTP ステータスコード

エラーコード

エラーメッセージ

説明

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.

完全なリストについては、「エラーコード」をご参照ください。

変更履歴

完全なリストについては、「変更履歴」をご参照ください。