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

Network Watchers - Get Troubleshooting

启动对指定资源进行故障排除。

POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/troubleshoot?api-version=2023-09-01

URI 参数

名称 必需 类型 说明
networkWatcherName
path True

string

网络观察程序资源的名称。

resourceGroupName
path True

string

资源组的名称。

subscriptionId
path True

string

可以唯一标识 Microsoft Azure 订阅的订阅凭据。 此订阅 ID 是每个服务调用的 URI 的一部分。

api-version
query True

string

客户端 API 版本。

请求正文

名称 必需 类型 说明
properties.storageId True

string

用于保存故障排除结果的存储帐户的 ID。

properties.storagePath True

string

用于保存故障排除结果的 Blob 的路径。

targetResourceId True

string

要进行故障排除的目标资源。

响应

名称 类型 说明
200 OK

TroubleshootingResult

成功的故障排除请求。

202 Accepted

TroubleshootingResult

已接受获取故障排除请求。

Other Status Codes

ErrorResponse

描述操作失败原因的错误响应。

安全性

azure_auth

Azure Active Directory OAuth2 Flow。

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

名称 说明
user_impersonation 模拟用户帐户

示例

Get troubleshooting

Sample Request

POST https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkWatchers/nw1/troubleshoot?api-version=2023-09-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"
  }
}

Sample Response

{
  "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=2023-09-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"
        }
      ]
    }
  ]
}

定义

名称 说明
ErrorDetails

常见错误详细信息表示形式。

ErrorResponse

错误对象。

TroubleshootingDetails

从对指定资源进行故障排除中获得的信息。

TroubleshootingParameters

定义要排除故障的资源的参数。

TroubleshootingRecommendedActions

基于发现的问题建议的操作。

TroubleshootingResult

从指定资源获取的故障排除信息。

ErrorDetails

常见错误详细信息表示形式。

名称 类型 说明
code

string

错误代码。

message

string

错误消息。

target

string

错误目标。

ErrorResponse

错误对象。

名称 类型 说明
error

ErrorDetails

错误
错误详细信息对象。

TroubleshootingDetails

从对指定资源进行故障排除中获得的信息。

名称 类型 说明
detail

string

有关故障排除结果的详细信息。

id

string

get 故障排除操作的 ID。

reasonType

string

失败的原因类型。

recommendedActions

TroubleshootingRecommendedActions[]

建议的操作列表。

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

故障排除的结束时间。

results

TroubleshootingDetails[]

故障排除中的信息。

startTime

string

故障排除的开始时间。