Share via


az network watcher troubleshooting

管理網路監看員疑難排解會話。

如需設定疑難排解的詳細資訊,請造訪 https://docs.microsoft.com/azure/network-watcher/network-watcher-troubleshoot-manage-cli

命令

名稱 Description 類型 狀態
az network watcher troubleshooting show

取得上次疑難排解作業的結果。

核心 GA
az network watcher troubleshooting start

針對 VPN 連線或閘道連線的問題進行疑難排解。

核心 GA

az network watcher troubleshooting show

取得上次疑難排解作業的結果。

az network watcher troubleshooting show --resource
                                        [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                                        [--resource-group]
                                        [--resource-type {vnetGateway, vpnConnection}]
                                        [--watcher-rg]

範例

顯示 Vnet 閘道疑難排解作業的結果或狀態。

az network watcher troubleshooting show -g MyResourceGroup --resource MyVnetGateway --resource-type vnetGateway

必要參數

--resource

要疑難排解的資源名稱或識別碼。

選擇性參數

--no-wait

請勿等候長時間執行的作業完成。

接受的值: 0, 1, f, false, n, no, t, true, y, yes
--resource-group -g

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

--resource-type -t

資源類型。

接受的值: vnetGateway, vpnConnection
--watcher-rg

監看員所屬的資源群組名稱。

全域參數
--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 network watcher troubleshooting start

針對 VPN 連線或閘道連線的問題進行疑難排解。

az network watcher troubleshooting start --resource
                                         --storage-account
                                         --storage-path
                                         [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                                         [--resource-group]
                                         [--resource-type {vnetGateway, vpnConnection}]
                                         [--watcher-rg]

範例

在 VPN 連線ion 上啟動疑難排解作業。

az network watcher troubleshooting start -g MyResourceGroup --resource MyVPNConnection --resource-type vpnConnection --storage-account MyStorageAccount --storage-path https://{storageAccountName}.blob.core.windows.net/{containerName}

必要參數

--resource

要疑難排解的資源名稱或識別碼。

--storage-account

用來儲存疑難排解結果的儲存體帳戶名稱或識別碼。

--storage-path

用來儲存疑難排解結果之儲存體 Blob 容器的完整 URI。

選擇性參數

--no-wait

請勿等候長時間執行的作業完成。

接受的值: 0, 1, f, false, n, no, t, true, y, yes
--resource-group -g

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

--resource-type -t

如果未指定資源識別碼,則為要疑難排解的目標資源類型。

接受的值: vnetGateway, vpnConnection
--watcher-rg

監看員所屬的資源群組名稱。

全域參數
--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 來取得完整偵錯記錄。