你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

az network watcher troubleshooting

管理网络观察程序故障排除会话。

有关配置故障排除的详细信息,请访问 https://docs.microsoft.com/azure/network-watcher/network-watcher-troubleshoot-manage-cli

命令

名称 说明 类型 状态
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

要排除故障的资源的名称或 ID。

可选参数

--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

订阅的名称或 ID。 可以使用 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 连接上启动故障排除操作。

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

要排除故障的资源的名称或 ID。

--storage-account

存储故障排除结果的存储帐户的名称或 ID。

--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

如果未指定资源 ID,则要进行故障排除的目标资源的类型。

接受的值: 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

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

提高日志记录详细程度。 使用 --debug 获取完整的调试日志。