az monitor data-collection rule performance-counter
注意
此參考是 Azure CLI 的 monitor-control-service 擴充功能的一部分(2.55.0 版或更高版本)。 擴充功能會在您第一次執行 az monitor data-collection rule performance-counter 命令時自動安裝。 深入了解擴充功能。
管理記錄性能計數器數據源。
命令
名稱 | Description | 類型 | 狀態 |
---|---|---|---|
az monitor data-collection rule performance-counter add |
新增記錄性能計數器數據源。 |
副檔名 | GA |
az monitor data-collection rule performance-counter delete |
刪除記錄性能計數器數據源。 |
副檔名 | GA |
az monitor data-collection rule performance-counter list |
列出記錄性能計數器數據源。 |
副檔名 | GA |
az monitor data-collection rule performance-counter show |
顯示記錄性能計數器數據源。 |
副檔名 | GA |
az monitor data-collection rule performance-counter update |
更新記錄性能計數器數據源。 |
副檔名 | GA |
az monitor data-collection rule performance-counter add
新增記錄性能計數器數據源。
az monitor data-collection rule performance-counter add --counter-specifiers
--name
--resource-group
--rule-name
--sampling-frequency
--streams {Microsoft-InsightsMetrics, Microsoft-Perf}
範例
新增記錄性能計數器數據源
az monitor data-collection rule performance-counter add --rule-name "myCollectionRule" --resource-group "myResourceGroup" --name "team2ExtraCounters" --streams "Microsoft-Perf" --counter-specifiers "\\Process(_Total)\\Thread Count" "\\LogicalDisk(_Total)\\Free Megabytes" --sampling-frequency 30
必要參數
您想要收集之性能計數器的規範名稱清單。使用通配符 \ 收集所有實例的計數器。 若要在 Windows 上取得性能計數器清單,請執行命令 『typeperf』。
數據源的易記名稱。 此名稱在數據收集規則內的所有數據源中都應該是唯一的。不論類型為何。
資源群組的名稱。 您可以使用 來設定預設群組 az configure --defaults group=<name>
。
數據收集規則的名稱。 名稱不區分大小寫。
連續計數器度量之間的秒數(樣本)。
此數據源將傳送至的數據流清單。 數據流會指出將針對此數據使用哪些架構,而且通常會在Log Analytics中將數據傳送至哪個數據表。
全域參數
增加記錄詳細資訊,以顯示所有偵錯記錄。
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
輸出格式。
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
訂用帳戶的名稱或標識碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID
帳戶。
增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。
az monitor data-collection rule performance-counter delete
刪除記錄性能計數器數據源。
az monitor data-collection rule performance-counter delete --name
--resource-group
--rule-name
範例
刪除記錄性能計數器數據源
az monitor data-collection rule performance-counter delete --rule-name "myCollectionRule" --resource-group "myResourceGroup" --name "team2ExtraCounters"
必要參數
數據源的易記名稱。 此名稱在數據收集規則內的所有數據源中都應該是唯一的。不論類型為何。
資源群組的名稱。 您可以使用 來設定預設群組 az configure --defaults group=<name>
。
數據收集規則的名稱。 名稱不區分大小寫。
全域參數
增加記錄詳細資訊,以顯示所有偵錯記錄。
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
輸出格式。
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
訂用帳戶的名稱或標識碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID
帳戶。
增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。
az monitor data-collection rule performance-counter list
列出記錄性能計數器數據源。
az monitor data-collection rule performance-counter list --resource-group
--rule-name
範例
列出記錄性能計數器數據源
az monitor data-collection rule performance-counter list --rule-name "myCollectionRule" --resource-group "myResourceGroup"
必要參數
資源群組的名稱。 您可以使用 來設定預設群組 az configure --defaults group=<name>
。
數據收集規則的名稱。 名稱不區分大小寫。
全域參數
增加記錄詳細資訊,以顯示所有偵錯記錄。
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
輸出格式。
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
訂用帳戶的名稱或標識碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID
帳戶。
增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。
az monitor data-collection rule performance-counter show
顯示記錄性能計數器數據源。
az monitor data-collection rule performance-counter show --name
--resource-group
--rule-name
範例
顯示記錄性能計數器數據源
az monitor data-collection rule performance-counter show --rule-name "myCollectionRule" --resource-group "myResourceGroup" --name "appTeamExtraCounters"
必要參數
數據源的易記名稱。 此名稱在數據收集規則內的所有數據源中都應該是唯一的。不論類型為何。
資源群組的名稱。 您可以使用 來設定預設群組 az configure --defaults group=<name>
。
數據收集規則的名稱。 名稱不區分大小寫。
全域參數
增加記錄詳細資訊,以顯示所有偵錯記錄。
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
輸出格式。
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
訂用帳戶的名稱或標識碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID
帳戶。
增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。
az monitor data-collection rule performance-counter update
更新記錄性能計數器數據源。
az monitor data-collection rule performance-counter update --name
--resource-group
--rule-name
[--counter-specifiers]
[--sampling-frequency]
[--streams {Microsoft-InsightsMetrics, Microsoft-Perf}]
範例
更新記錄性能計數器數據源
az monitor data-collection rule performance-counter update --rule-name "myCollectionRule" --resource-group "myResourceGroup" --name "team2ExtraCounters"
必要參數
數據源的易記名稱。 此名稱在數據收集規則內的所有數據源中都應該是唯一的。不論類型為何。
資源群組的名稱。 您可以使用 來設定預設群組 az configure --defaults group=<name>
。
數據收集規則的名稱。 名稱不區分大小寫。
選擇性參數
您想要收集之性能計數器的規範名稱清單。使用通配符 \ 收集所有實例的計數器。 若要在 Windows 上取得性能計數器清單,請執行命令 『typeperf』。
連續計數器度量之間的秒數(樣本)。
此數據源將傳送至的數據流清單。 數據流會指出將針對此數據使用哪些架構,而且通常會在Log Analytics中將數據傳送至哪個數據表。
全域參數
增加記錄詳細資訊,以顯示所有偵錯記錄。
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
輸出格式。
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
訂用帳戶的名稱或標識碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID
帳戶。
增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應