az monitor activity-log

管理活動記錄。

命令

名稱 Description 類型 狀態
az monitor activity-log alert

管理活動記錄警示規則。

核心 GA
az monitor activity-log alert action-group

管理活動記錄。

核心 GA
az monitor activity-log alert action-group add

將動作群組新增至此活動記錄警示規則。 它也可以用來覆寫特定動作群組的現有 Webhook 屬性。

核心 GA
az monitor activity-log alert action-group remove

從此活動記錄警示規則中移除動作群組。

核心 GA
az monitor activity-log alert create

建立預設活動記錄警示規則。

核心 GA
az monitor activity-log alert delete

刪除活動記錄警示。

核心 GA
az monitor activity-log alert list

列出資源群組或目前訂用帳戶下的活動記錄警示規則。

核心 GA
az monitor activity-log alert scope

管理活動記錄。

核心 GA
az monitor activity-log alert scope add

將範圍新增至此活動記錄警示規則。

核心 GA
az monitor activity-log alert scope remove

從此活動記錄警示規則中移除範圍。

核心 GA
az monitor activity-log alert show

取得活動記錄警示。

核心 GA
az monitor activity-log alert update

更新新的活動記錄警示或更新現有的活動記錄警示。

核心 GA
az monitor activity-log list

列出和查詢活動記錄事件。

核心 GA
az monitor activity-log list-categories

列出活動記錄服務中支援的可用事件類別清單。

核心 GA

az monitor activity-log list

列出和查詢活動記錄事件。

az monitor activity-log list [--caller]
                             [--correlation-id]
                             [--end-time]
                             [--max-events]
                             [--namespace]
                             [--offset]
                             [--resource-group]
                             [--resource-id]
                             [--select {authorization, caller, category, claims, correlationId, description, eventDataId, eventName, eventTimestamp, httpRequest, id, level, operationId, operationName, properties, resourceGroupName, resourceId, resourceProviderName, resourceType, status, subStatus, submissionTimestamp, subscriptionId, tenantId}]
                             [--start-time]
                             [--status]

範例

列出 7 月 1 日的所有活動,期待一周。

az monitor activity-log list --start-time 2018-07-01 --offset 7d

根據相互關聯識別碼列出過去六小時內的事件。

az monitor activity-log list --correlation-id b5eac9d2-e829-4c9a-9efb-586d19417c5f

根據資源群組列出過去一小時內的事件。

az monitor activity-log list -g {ResourceGroup} --offset 1h

選擇性參數

--caller

要查詢的呼叫者,例如電子郵件地址或服務主體識別碼。

--correlation-id

要查詢的相互關聯識別碼。

--end-time

查詢的結束時間。 預設為目前時間。 格式:date(yyyy-mm-dd) time (hh:mm:ss.xxxxx) timezone (+/-hh:mm)。

--max-events

要傳回的記錄數目上限。

預設值: 50
--namespace

資源提供者命名空間。

--offset

查詢範圍的時間位移,格式為 ##d##h。

可以搭配 --start-time 或 --end-time 使用。 如果搭配 --start-time 使用,則會藉由新增位移來計算結束時間。 如果使用 --end-time (預設值),則會藉由減去位移來計算開始時間。 如果提供 --start-time 和 --end-time,則會忽略 --offset。

預設值: 6h
--resource-group -g

資源組名。 您可以使用 來設定預設群組 az configure --defaults group=<name>

--resource-id

資源的 ARM 識別碼。

--select

要傳回之屬性的空間分隔清單。

接受的值: authorization, caller, category, claims, correlationId, description, eventDataId, eventName, eventTimestamp, httpRequest, id, level, operationId, operationName, properties, resourceGroupName, resourceId, resourceProviderName, resourceType, status, subStatus, submissionTimestamp, subscriptionId, tenantId
--start-time

查詢的開始時間。 格式:date(yyyy-mm-dd) time (hh:mm:ss.xxxxx) timezone (+/-hh:mm)。

--status

查詢的狀態(例如:失敗)。

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID 帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az monitor activity-log list-categories

列出活動記錄服務中支援的可用事件類別清單。

目前的清單包含下列專案:管理員istrative、Security、ServiceHealth、Alert、Recommendation、Policy。

az monitor activity-log list-categories
全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID 帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。