Network Watchers - Get Troubleshooting
在指定资源上启动故障排除。
POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/troubleshoot?api-version=2025-03-01
URI 参数
| 名称 | 在 | 必需 | 类型 | 说明 |
|---|---|---|---|---|
|
network
|
path | True |
string |
网络观察程序资源的名称。 |
|
resource
|
path | True |
string |
资源组的名称。 |
|
subscription
|
path | True |
string |
唯一标识 Azure 订阅Microsoft的订阅凭据。 订阅 ID 构成了每个服务调用的 URI 的一部分。 |
|
api-version
|
query | True |
string |
客户端 API 版本。 |
请求正文
| 名称 | 必需 | 类型 | 说明 |
|---|---|---|---|
| properties.storageId | True |
string |
用于保存故障排除结果的存储帐户的 ID。 |
| properties.storagePath | True |
string |
要保存故障排除结果的 blob 的路径。 |
| targetResourceId | True |
string |
要排查的目标资源。 |
响应
| 名称 | 类型 | 说明 |
|---|---|---|
| 200 OK |
成功的故障排除请求。 |
|
| 202 Accepted |
已接受获取故障排除请求。 |
|
| Other Status Codes |
描述作失败的原因的错误响应。 |
安全性
azure_auth
Azure Active Directory OAuth2 Flow。
类型:
oauth2
流向:
implicit
授权 URL:
https://login.microsoftonline.com/common/oauth2/authorize
作用域
| 名称 | 说明 |
|---|---|
| user_impersonation | 模拟用户帐户 |
示例
Get troubleshooting
示例请求
POST https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkWatchers/nw1/troubleshoot?api-version=2025-03-01
{
"targetResourceId": "/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Compute/virtualMachines/vm1",
"properties": {
"storageId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Storage/storageAccounts/st1",
"storagePath": "https://st1.blob.core.windows.net/cn1"
}
}
示例响应
{
"startTime": "2017-01-12T00:19:47.0442834Z",
"endTime": "2017-01-12T00:20:09.914Z",
"code": "UnHealthy",
"results": [
{
"id": "000000",
"reasonType": "VipUnResponsive",
"summary": "We are sorry, your VPN gateway is unreachable from the Internet",
"detail": "During this time S2S VPN tunnels to on premises sites or other Azure virtual networks will be disconnected",
"recommendedActions": [
{
"actionText": "Verify if there is a network security group (NSG) applied to the GatewaySubnet",
"actionUri": "https://docs.microsoft.com/en-us/azure/virtual-network/virtual-networks-create-nsg-arm-pportal",
"actionUriText": "Verify"
},
{
"actionText": "If your VPN gateway isn't up and running by the expected resolution time, contact support",
"actionUri": "http://azure.microsoft.com/support",
"actionUriText": "contact support"
}
]
}
]
}
Location: https:/management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkWatchers/nw1/troubleshoot?api-version=2025-03-01
{
"startTime": "2017-01-12T00:19:47.0442834Z",
"endTime": "2017-01-12T00:20:09.914Z",
"code": "UnHealthy",
"results": [
{
"id": "000000",
"reasonType": "VipUnResponsive",
"summary": "We are sorry, your VPN gateway is unreachable from the Internet",
"detail": "During this time S2S VPN tunnels to on premises sites or other Azure virtual networks will be disconnected",
"recommendedActions": [
{
"actionText": "Verify if there is a network security group (NSG) applied to the GatewaySubnet",
"actionUri": "https://docs.microsoft.com/en-us/azure/virtual-network/virtual-networks-create-nsg-arm-pportal",
"actionUriText": "Verify"
},
{
"actionText": "If your VPN gateway isn't up and running by the expected resolution time, contact support",
"actionUri": "http://azure.microsoft.com/support",
"actionUriText": "contact support"
}
]
}
]
}
定义
| 名称 | 说明 |
|---|---|
|
Error |
常见的错误详细信息表示形式。 |
|
Error |
错误对象。 |
|
Troubleshooting |
从对指定资源进行故障排除中获得的信息。 |
|
Troubleshooting |
用于定义要排除故障的资源的参数。 |
|
Troubleshooting |
基于发现的问题的建议操作。 |
|
Troubleshooting |
排查从指定资源获取的信息。 |
ErrorDetails
常见的错误详细信息表示形式。
| 名称 | 类型 | 说明 |
|---|---|---|
| code |
string |
错误代码。 |
| message |
string |
错误消息。 |
| target |
string |
错误目标。 |
ErrorResponse
错误对象。
| 名称 | 类型 | 说明 |
|---|---|---|
| error |
错误 |
TroubleshootingDetails
从对指定资源进行故障排除中获得的信息。
| 名称 | 类型 | 说明 |
|---|---|---|
| detail |
string |
有关故障排除结果的详细信息。 |
| id |
string |
获取疑难解答作的 ID。 |
| reasonType |
string |
失败的原因类型。 |
| recommendedActions |
建议作列表。 |
|
| summary |
string |
故障排除摘要。 |
TroubleshootingParameters
用于定义要排除故障的资源的参数。
| 名称 | 类型 | 说明 |
|---|---|---|
| properties.storageId |
string |
用于保存故障排除结果的存储帐户的 ID。 |
| properties.storagePath |
string |
要保存故障排除结果的 blob 的路径。 |
| targetResourceId |
string |
要排查的目标资源。 |
TroubleshootingRecommendedActions
基于发现的问题的建议操作。
| 名称 | 类型 | 说明 |
|---|---|---|
| actionId |
string |
建议作的 ID。 |
| actionText |
string |
建议作的描述。 |
| actionUri |
string |
链接到建议故障排除作的文档的 uri。 |
| actionUriText |
string |
URI 中建议的故障排除作的信息。 |
TroubleshootingResult
排查从指定资源获取的信息。
| 名称 | 类型 | 说明 |
|---|---|---|
| code |
string |
故障排除的结果代码。 |
| endTime |
string (date-time) |
故障排除的结束时间。 |
| results |
故障排除中的信息。 |
|
| startTime |
string (date-time) |
故障排除的开始时间。 |