容器執行個體 監視數據參考

本文包含此服務的所有監視參考資訊。

如需您可以針對 容器執行個體 收集的數據及其使用方式的詳細資訊,請參閱監視 容器執行個體。

計量

本節列出針對此服務的所有自動收集平台計量。 這些計量也是 Azure 監視器中支援的所有平台計量全域清單的一部分。

如需計量保留的相關資訊,請參閱 Azure 監視器計量概觀

Microsoft.ContainerInstance/containerGroups 支持的計量

下表列出適用於 Microsoft.ContainerInstance/containerGroups 資源類型的計量。

  • 所有資料行可能不存在於每個資料表中。
  • 某些資料行可能超出頁面的檢視區域。 選取 [展開資料表] 以檢視所有可用的資料行。

資料表標題

  • 類別 - 計量群組或分類。
  • 計量 - Azure 入口網站中顯示的計量顯示名稱。
  • REST API 中的名稱 - REST API 中所指的計量名稱。
  • 單位 - 測量單位。
  • 彙總 - 預設彙總類型。 有效值:平均值 (Avg)、最小值 (Min)、最大值 (Max)、總計 (Sum)、計數。
  • 維度 - 計量可用的維度
  • 時間精細度 - 取樣計量的間隔。 例如,PT1M 表示計量會每分鐘取樣、每 30 分鐘PT30M、每小時 PT1H,以此類推。
  • DS 匯出 - 計量是否可透過診斷設定,匯出至 Azure 監視器記錄。 如需匯出計量的資訊,請參閱在 Azure 監視器中建立診斷設定
計量 REST API 中的名稱 單位 彙總 維度 時間精細度 DS 匯出
CPU 使用量

millicores 中所有核心的 CPU 使用量。
CpuUsage 計數 最大值、最小值、平均 containerName PT1M、PT5M、PT15M、PT30M、PT1H、PT6H、PT12H Yes
記憶體使用量

位元組中的記憶體使用量總計。
MemoryUsage Bytes 最大值、最小值、平均 containerName PT1M、PT5M、PT15M、PT30M、PT1H、PT6H、PT12H Yes
每秒接收的網路位元組數

每秒接收的網路位元組數。
NetworkBytesReceivedPerSecond Bytes 最大值、最小值、平均 <none> PT1M、PT5M、PT15M、PT30M、PT1H、PT6H、PT12H Yes
每秒傳輸的網路位元組數

每秒傳輸的網路位元組數。
NetworkBytesTransmittedPerSecond Bytes 最大值、最小值、平均 <none> PT1M、PT5M、PT15M、PT30M、PT1H、PT6H、PT12H Yes

Microsoft.ContainerInstance/containerScaleSets 支持的計量

下表列出適用於 Microsoft.ContainerInstance/containerScaleSets 資源類型的計量。

  • 所有資料行可能不存在於每個資料表中。
  • 某些資料行可能超出頁面的檢視區域。 選取 [展開資料表] 以檢視所有可用的資料行。

資料表標題

  • 類別 - 計量群組或分類。
  • 計量 - Azure 入口網站中顯示的計量顯示名稱。
  • REST API 中的名稱 - REST API 中所指的計量名稱。
  • 單位 - 測量單位。
  • 彙總 - 預設彙總類型。 有效值:平均值 (Avg)、最小值 (Min)、最大值 (Max)、總計 (Sum)、計數。
  • 維度 - 計量可用的維度
  • 時間精細度 - 取樣計量的間隔。 例如,PT1M 表示計量會每分鐘取樣、每 30 分鐘PT30M、每小時 PT1H,以此類推。
  • DS 匯出 - 計量是否可透過診斷設定,匯出至 Azure 監視器記錄。 如需匯出計量的資訊,請參閱在 Azure 監視器中建立診斷設定
計量 REST API 中的名稱 單位 彙總 維度 時間精細度 DS 匯出
百分比 CPU

此擴展集中個別容器群組所耗用的CPU百分比平均值
CpuPercentage Percent Average、Minimum、Maximum containerName PT1M Yes
CPU 使用量

此擴展集中容器群組所耗用的CPU使用率平均值
CpuUsage MilliCores 總計(Sum)、平均、最小值、最大值 containerName PT1M Yes
記憶體百分比

此擴展集中容器群組所耗用的記憶體百分比平均 (usedMemory/allocatedMemory) * 100)
MemoryPercentage Percent Average、Minimum、Maximum containerName PT1M Yes
記憶體使用量

此擴展集中所有容器群組所使用的記憶體總計
MemoryUsage Bytes 總計(Sum)、平均、最小值、最大值 containerName PT1M Yes

載入計量維度

如需計量維度是什麼的資訊,請參閱多維度計量

此服務具有下列與其計量相關聯的維度。

維度名稱 描述
containerName 容器的名稱。 名稱長度必須介於 1 到 63 個字元之間。 它只能包含小寫字母和虛線。 虛線無法開始或結束名稱,連字元不能連續。 名稱在其資源群組中必須是唯一的。

資源記錄

本節列出您可以針對此服務收集的資源記錄類型。 該區段會從 Azure 監視器中支援的所有資源記錄類別類型清單提取。

Microsoft.ContainerInstance/containerGroups 支持的資源記錄

類別 類別顯示名稱 記錄資料表 支援基本記錄計劃 支援擷取時間轉換 範例查詢 匯出的成本
ContainerEvent 容器事件 ContainerEvent

容器事件客戶記錄。

No Yes
ContainerInstanceLog 標準輸出記錄 ContainerInstanceLog

容器實例客戶記錄。

No Yes

Azure 監視器記錄資料表

本節列出與此服務相關的 Azure 監視器記錄資料表,並且該資料表可供 Log Analytics 使用 Kusto 查詢進行查詢。 資料表包含資源記錄資料,而且可能包含更多資料,具體取決於所收集及路由傳送至此的內容。

容器執行個體 有兩個數據表架構、Log Analytics 的舊版架構,以及支援診斷設定的新架構。 診斷設定功能在 Azure 入口網站 中處於公開預覽狀態。 您可以同時使用或兩個架構。

舊版 Log Analytics 數據表

下列 _CL 數據表代表舊版Log Analytics整合。 使用者會在容器群組承載中提供Log Analytics工作區標識碼和密鑰。

注意

下列清單中的某些數據行只存在於架構中,而且不會在記錄中發出任何數據。 這些數據行會以 『Empty』 的描述表示。

ContainerInstanceLog_CL

資料行 類型​ 描述
電腦 string 空的
ContainerGroup_s string 與記錄相關的容器群組名稱
ContainerID_s string 與記錄相關容器的唯一識別碼
ContainerImage_s string 與記錄相關的容器映像名稱
Location_s string 與記錄相關的資源位置
訊息 string 來自容器的訊息 (如果適用)
OSType_s string 容器所依據的作業系統名稱
RawData string 空的
ResourceGroup string 與記錄相關的資源群組名稱
Source_s string 記錄元件的名稱,即 "LoggingAgent"
SubscriptionId string 與記錄相關的訂用帳戶唯一識別碼
TimeGenerated Datetime Azure 服務產生事件的時間戳記,而該 Azure 服務會針對事件對應的要求進行處理。
型別 string 資料表的名稱
_ResourceId string 記錄相關資源的唯一識別碼
_SubscriptionId string 與記錄相關的訂用帳戶唯一識別碼

ContainerEvent_CL

資料行 類型​ 描述
電腦 string 空的
ContainerGroupInstanceId_g string 與記錄相關的容器群組唯一識別碼
ContainerGroup_s string 與記錄相關的容器群組名稱
ContainerName_s string 與記錄相關的容器名稱
Count_d real 自上次輪詢後事件的發生次數
FirstTimestamp_t Datetime 第一次發生事件的時間戳記
Location_s string 與記錄相關的資源位置
訊息 string 來自容器的訊息 (如果適用)
OSType_s string 容器所依據的作業系統名稱
RawData string 空的
Reason_s 字串 空的
ResourceGroup string 與記錄相關的資源群組名稱
SubscriptionId string 與記錄相關的訂用帳戶唯一識別碼
TimeGenerated Datetime Azure 服務產生事件的時間戳記,而該 Azure 服務會針對事件對應的要求進行處理。
型別 string 資料表的名稱
_ResourceId string 記錄相關資源的唯一識別碼
_SubscriptionId string 與記錄相關的訂用帳戶唯一識別碼

Azure Monitor Log Analytics tables

較新的數據表需要使用診斷設定,將資訊路由傳送至Log Analytics。 Azure 入口網站 中 容器執行個體 的診斷設定功能處於公開預覽狀態。 數據表名稱很類似,但沒有_CL,有些數據行則不同。

一旦針對訂用帳戶啟用這項功能,診斷設定就可以套用至容器群組。 套用診斷設定會導致容器群組重新啟動。

例如,以下說明如何使用 New-AzDiagnosticSetting 命令將診斷設定物件套用至容器群組。

$log = @()
$log += New-AzDiagnosticSettingLogSettingsObject -Enabled $true -Category ContainerInstanceLog -RetentionPolicyDay 7 -RetentionPolicyEnabled $true
 
New-AzDiagnosticSetting -Name test-setting -ResourceId <container-group-resource-id> -WorkspaceId <log-analytics-workspace-id> -Log $log

容器執行個體

Microsoft.ContainerInstance/containerGroups

活動記錄檔

連結的資料表會列出此服務活動記錄檔中可記錄的操作。 這些操作是活動記錄中的所有可能資源提供者操作的子集。

如需活動記錄項目結構描述的詳細資訊,請參閱活動記錄結構描述

下表列出 Azure 容器執行個體 可能在活動記錄檔中記錄的作業子集。 如需完整清單,請參閱 Microsoft.ContainerInstance 資源提供者作業

作業 描述
Microsoft.ContainerInstance/register/action 註冊容器實例資源提供者的訂用帳戶,並啟用容器群組的建立。
Microsoft.ContainerInstance/containerGroupProfiles/read 取得所有容器群組配置檔。
Microsoft.ContainerInstance/containerGroupProfiles/write 建立或更新特定的容器群組配置檔。
Microsoft.ContainerInstance/containerGroupProfiles/delete 刪除特定的容器群組配置檔。
Microsoft.ContainerInstance/containerGroups/read 取得所有容器群組。
Microsoft.ContainerInstance/containerGroups/write 建立或更新特定的容器群組。
Microsoft.ContainerInstance/containerGroups/delete 刪除特定的容器群組。
Microsoft.ContainerInstance/containerGroups/restart/action 重新啟動特定的容器群組。 此記錄只會擷取客戶初始化的重新啟動,而不是由 Azure 容器執行個體 基礎結構起始的重新啟動。
Microsoft.ContainerInstance/containerGroups/stop/action 停止特定的容器群組。 計算資源已解除分配,計費會停止。
Microsoft.ContainerInstance/containerGroups/start/action 啟動特定的容器群組。
Microsoft.ContainerInstance/containerGroups/containers/exec/action Exec 進入特定容器。
Microsoft.ContainerInstance/containerGroups/containers/attach/action 附加至容器的輸出數據流。
Microsoft.ContainerInstance/containerGroups/containers/buildlogs/read 取得特定容器的組建記錄。
Microsoft.ContainerInstance/containerGroups/containers/logs/read 取得特定容器的記錄。
Microsoft.ContainerInstance/containerGroups/detectors/read 列出容器群組偵測器
Microsoft.ContainerInstance/containerGroups/operationResults/read 取得異步操作結果
Microsoft.ContainerInstance/containerGroups/outboundNetworkDependenciesEndpoints/read 列出容器群組偵測器
Microsoft.ContainerInstance/containerGroups/providers/Microsoft.Insights/diagnosticSettings/read 取得容器群組的診斷設定。
Microsoft.ContainerInstance/containerGroups/providers/Microsoft.Insights/diagnosticSettings/write 建立或更新容器群組的診斷設定。
Microsoft.ContainerInstance/containerGroups/providers/Microsoft.Insights/metricDefinitions/read 取得容器群組的可用計量。
Microsoft.ContainerInstance/locations/deleteVirtualNetworkOrSubnets/action 通知Microsoft.ContainerInstance 正在刪除虛擬網路或子網。
Microsoft.ContainerInstance/locations/cachedImages/read 取得區域中訂用帳戶的快取映像。
Microsoft.ContainerInstance/locations/capabilities/read 取得區域的功能。
Microsoft.ContainerInstance/locations/operationResults/read 取得異步操作結果
Microsoft.ContainerInstance/locations/operations/read 列出 Azure 容器實例服務的作業。
Microsoft.ContainerInstance/locations/usages/read 取得特定區域的使用量。
Microsoft.ContainerInstance/operations/read 列出 Azure 容器實例服務的作業。
Microsoft.ContainerInstance/serviceassociationlinks/delete 刪除子網上 Azure 容器實例資源提供者所建立的服務關聯連結。