Alerts - Get History

取得警示的歷程記錄,此記錄會擷取任何監視條件變更, (引發/解決) 和警示狀態變更, (New/Acknowledged/Closed) 。

GET https://management.azure.com/{scope}/providers/Microsoft.AlertsManagement/alerts/{alertId}/history?api-version=2023-07-12-preview

URI 參數

名稱 位於 必要 類型 Description
alertId
path True

string

警示實例的唯一標識碼。

scope
path True

string

這裡的範圍是建立警示的 resourceId。

api-version
query True

string

用於此作業的 API 版本。

回應

名稱 類型 Description
200 OK

alertModification

正常。 傳回指定警示的歷程記錄。

Other Status Codes

errorResponse

描述作業失敗原因的錯誤回應。

範例

Resolve

Sample Request

GET https://management.azure.com/subscriptions/9e261de7-c804-4b9d-9ebf-6f50fe350a9a/providers/Microsoft.AlertsManagement/alerts/66114d64-d9d9-478b-95c9-b789d6502100/history?api-version=2023-07-12-preview

Sample Response

{
  "properties": {
    "alertId": "66114d64-d9d9-478b-95c9-b789d6502100",
    "modifications": [
      {
        "modificationEvent": "StateChange",
        "oldValue": "New",
        "newValue": "Acknowledged",
        "modifiedAt": "2018-06-13T06:14:15.7378737Z",
        "modifiedBy": "vikramm@microsoft.com",
        "comments": "Acknowledging alert",
        "description": "State changed from 'New' to 'Acknowledged'"
      },
      {
        "modificationEvent": "AlertCreated",
        "oldValue": "",
        "newValue": "",
        "modifiedAt": "2018-06-13T06:09:01Z",
        "modifiedBy": "System",
        "comments": "",
        "description": "New Alert Object is created"
      }
    ]
  },
  "id": "/subscriptions/9e261de7-c804-4b9d-9ebf-6f50fe350a9a/providers/Microsoft.AlertsManagement/alerts/66114d64-d9d9-478b-95c9-b789d6502100/history/default",
  "type": "Microsoft.AlertsManagement/alerts",
  "name": "CPU Alert"
}

定義

名稱 Description
alertModification

警示修改詳細數據

AlertModificationEvent

修改的原因

alertModificationItem

警示修改專案。

alertModificationProperties

警示修改項目的屬性。

errorResponse

來自服務的錯誤回應。

errorResponseBody

錯誤回應的詳細數據。

alertModification

警示修改詳細數據

名稱 類型 Description
id

string

Azure 資源標識碼

name

string

Azure 資源名稱

properties

alertModificationProperties

警示修改項目的屬性。

type

string

Azure 資源類型

AlertModificationEvent

修改的原因

名稱 類型 Description
ActionRuleSuppressed

string

ActionRuleTriggered

string

ActionsFailed

string

ActionsSuppressed

string

ActionsTriggered

string

AlertCreated

string

MonitorConditionChange

string

SeverityChange

string

StateChange

string

alertModificationItem

警示修改專案。

名稱 類型 Description
comments

string

修改批註

description

string

修改的描述

modificationEvent

AlertModificationEvent

修改的原因

modifiedAt

string

修改的日期和時間

modifiedBy

string

已修改的使用者詳細數據 (主體用戶端名稱)

newValue

string

新值

oldValue

string

舊值

alertModificationProperties

警示修改項目的屬性。

名稱 類型 Description
alertId

string

正在擷取歷程記錄之警示的唯一標識碼

modifications

alertModificationItem[]

修改詳細數據

errorResponse

來自服務的錯誤回應。

名稱 類型 Description
error

errorResponseBody

錯誤回應的詳細數據。

errorResponseBody

錯誤回應的詳細數據。

名稱 類型 Description
code

string

錯誤碼,旨在以程序設計方式取用。

details

errorResponseBody[]

錯誤的其他詳細數據清單。

message

string

錯誤的描述,用於顯示在使用者介面中。

target

string

特定錯誤的目標,例如屬性的名稱。