共用方式為


az monitor app-insights

備註

此參考是 Azure CLI 的 application-insights 擴充功能的一部分(2.55.0 版或更高版本)。 當您第一次執行 az monitor app-insights 命令 時,擴充功能會自動安裝。 深入瞭解擴充功能

用於查詢 Application Insights 應用程式中數據的命令。

命令

名稱 Description 類型 狀態
az monitor app-insights api-key

與 Application Insights 元件相關聯的 API 金鑰作業。

擴充套件 GA
az monitor app-insights api-key create

建立 Application Insights 元件的 API 金鑰。

擴充套件 GA
az monitor app-insights api-key delete

從 Application Insights 資源刪除 API 金鑰。

擴充套件 GA
az monitor app-insights api-key show

取得與 Application Insights 資源相關聯的所有密鑰或特定 API 金鑰。

擴充套件 GA
az monitor app-insights component

管理 Application Insights 元件或其子元件。

擴充套件 GA
az monitor app-insights component billing

管理 Application Insights 元件計費功能。

擴充套件 GA
az monitor app-insights component billing show

顯示 Application Insights 資源的計費功能。

擴充套件 GA
az monitor app-insights component billing update

更新 Application Insights 資源的計費功能。

擴充套件 GA
az monitor app-insights component connect-function

將 AI 連線到 Azure 函式。

擴充套件 GA
az monitor app-insights component connect-webapp

將 AI 連線到 Web 應用程式。

擴充套件 GA
az monitor app-insights component continues-export

管理 Application Insights 元件的連續匯出組態。

擴充套件 GA
az monitor app-insights component continues-export create

建立 Application Insights 元件的連續匯出組態。

擴充套件 GA
az monitor app-insights component continues-export delete

刪除 Application Insights 元件的特定連續匯出組態。

擴充套件 GA
az monitor app-insights component continues-export list

列出 Application Insights 元件的連續匯出組態清單。

擴充套件 GA
az monitor app-insights component continues-export show

取得此匯出標識碼的連續匯出組態。

擴充套件 GA
az monitor app-insights component continues-export update

更新 Application Insights 元件的連續匯出組態。

擴充套件 GA
az monitor app-insights component create

建立新 Application Insights 資源。

擴充套件 GA
az monitor app-insights component delete

刪除新的 Application Insights 資源。

擴充套件 GA
az monitor app-insights component favorite

管理元件我的最愛。

擴充套件 GA
az monitor app-insights component favorite create

建立 Application Insights 元件的新我的最愛。

擴充套件 GA
az monitor app-insights component favorite delete

刪除與 Application Insights 元件相關聯的我的最愛。

擴充套件 GA
az monitor app-insights component favorite list

列出 Application Insights 元件內定義的我的最愛清單。

擴充套件 GA
az monitor app-insights component favorite show

依其 FavoriteId 取得單一我的最愛,其定義於 Application Insights 元件內。

擴充套件 GA
az monitor app-insights component favorite update

將新的我的最愛更新為 Application Insights 元件。

擴充套件 GA
az monitor app-insights component linked-storage

管理 Application Insights 元件的連結記憶體帳戶。

擴充套件 GA
az monitor app-insights component linked-storage link

鏈接記憶體帳戶與 Application Insights 元件。

擴充套件 GA
az monitor app-insights component linked-storage show

取得 Application Insights 元件目前的鏈接記憶體設定。

擴充套件 GA
az monitor app-insights component linked-storage unlink

將記憶體帳戶與 Application Insights 元件取消連結。

擴充套件 GA
az monitor app-insights component linked-storage update

更新 Application Insights 元件目前的連結記憶體帳戶。

擴充套件 GA
az monitor app-insights component quotastatus

管理元件 quotastatus。

擴充套件 GA
az monitor app-insights component quotastatus show

顯示 Application Insights 元件的每日數據量上限(配額)狀態。

擴充套件 GA
az monitor app-insights component show

取得 Application Insights 資源。

擴充套件 GA
az monitor app-insights component update

更新現有 Application Insights 資源的屬性。 可更新的主要值是種類,可自定義UI體驗。

擴充套件 GA
az monitor app-insights component update-tags

更新現有 Application Insights 資源上的標籤。

擴充套件 GA
az monitor app-insights events

從應用程式擷取事件。

擴充套件 GA
az monitor app-insights events show

依類型列出事件,或從應用程式檢視單一事件,由類型和標識元指定。

擴充套件 GA
az monitor app-insights metrics

從應用程式擷取計量。

擴充套件 GA
az monitor app-insights metrics get-metadata

取得特定應用程式計量的元數據。

擴充套件 GA
az monitor app-insights metrics show

檢視單一計量的值。

擴充套件 GA
az monitor app-insights migrate-to-new-pricing-model

Enterprise 合約 客戶選擇使用新的定價模式。

擴充套件 GA
az monitor app-insights my-workbook

管理 my-workbook。

擴充套件 GA
az monitor app-insights my-workbook list

列出指定訂用帳戶和類別內定義的所有私人活頁簿。

擴充套件 GA
az monitor app-insights query

對應用程式中的數據執行查詢。

擴充套件 GA
az monitor app-insights web-test

使用 Application Insights 管理 Web 測試。

擴充套件 GA
az monitor app-insights web-test create

建立 Application Insights Web 測試定義。

擴充套件 GA
az monitor app-insights web-test delete

刪除 Application Insights Web 測試。

擴充套件 GA
az monitor app-insights web-test list

取得針對指定元件定義的所有 Application Insights Web 測試。 以及取得指定資源群組內定義的所有 Application Insights Web 測試。 以及取得訂用帳戶內的所有ApplicationInsights Web測試警示定義。

擴充套件 GA
az monitor app-insights web-test show

取得特定的 Application Insights Web 測試定義。

擴充套件 GA
az monitor app-insights web-test update

更新 Application Insights Web 測試定義。

擴充套件 GA
az monitor app-insights workbook

管理 app-insights 活頁簿。

擴充套件 GA
az monitor app-insights workbook create

建立活頁簿。

擴充套件 GA
az monitor app-insights workbook delete

刪除活頁簿。

擴充套件 GA
az monitor app-insights workbook identity

管理活頁簿標識碼。

擴充套件 GA
az monitor app-insights workbook identity assign

指派身分識別。

擴充套件 GA
az monitor app-insights workbook identity remove

拿掉身分識別。

擴充套件 GA
az monitor app-insights workbook list

列出指定資源群組和類別內定義的所有活頁簿。

擴充套件 GA
az monitor app-insights workbook revision

管理活頁簿修訂。

擴充套件 GA
az monitor app-insights workbook revision list

列出活頁簿的修訂。

擴充套件 GA
az monitor app-insights workbook revision show

顯示活頁簿修訂。

擴充套件 GA
az monitor app-insights workbook show

依資源名稱顯示單一活頁簿。

擴充套件 GA
az monitor app-insights workbook update

更新活頁簿。

擴充套件 GA

az monitor app-insights migrate-to-new-pricing-model

Enterprise 合約 客戶選擇使用新的定價模式。

az monitor app-insights migrate-to-new-pricing-model

範例

遷移至新的定價模式

az monitor app-insights migrate-to-new-pricing-model
全域參數
--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 app-insights query

對應用程式中的數據執行查詢。

az monitor app-insights query --analytics-query
                              [--apps]
                              [--end-time]
                              [--ids]
                              [--offset]
                              [--resource-group]
                              [--start-time]
                              [--subscription]

範例

在過去 1 小時 30 分鐘內執行簡單的查詢。

az monitor app-insights query --app e292531c-eb03-4079-9bb0-fe6b56b99f8b --analytics-query 'requests | summarize count() by bin(timestamp, 1h)' --offset 1h30m

必要參數

--analytics-query

查詢以透過Application Insights資料執行。

選擇性參數

--apps -a

Application Insights 元件的 GUID、應用程式名稱或完整 Azure 資源名稱。 您可以從 Azure 入口網站中任何 Application Insights 資源上的 API 存取功能表項取得應用程式 GUID。 如果使用應用程式名稱,請指定資源群組。

--end-time

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

--ids

一或多個資源識別碼(以空格分隔)。 它應該是包含 「資源標識碼」自變數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」自變數。

--offset

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

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

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

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

--start-time

要擷取數據的時間範圍開始時間。 格式:date(yyyy-mm-dd) time (hh:mm:ss.xxxxx) timezone (+/-hh:mm)。

--subscription

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

全域參數
--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。