服务连接监视器Service Connectivity Monitor

可以使用网络性能监视器中的服务连接监视器功能,监视与 TCP 端口打开的任何终结点之间的网络连接。You can use the Service Connectivity Monitor capability in Network Performance Monitor to monitor network connectivity to any endpoint that has an open TCP port. 此类终结点包括网站、SaaS 应用程序、PaaS 应用程序和 SQL 数据库。Such endpoints include websites, SaaS applications, PaaS applications, and SQL databases.

可以使用服务连接监视器实现以下功能:You can perform the following functions with Service Connectivity Monitor:

  • 监视从多个分支机构或位置到应用程序和网络服务的网络连接。Monitor the network connectivity to your applications and network services from multiple branch offices or locations. 应用程序和网络服务包括 Office 365、Dynamics CRM、内部业务线应用程序和 SQL 数据库。Applications and network services include Office 365, Dynamics CRM, internal line-of-business applications, and SQL databases.
  • 使用内置测试来监视与 Office 365 和 Dynamics 365 终结点建立的网络连接。Use built-in tests to monitor network connectivity to Office 365 and Dynamics 365 endpoints.
  • 确定在连接到终结点时经历的响应时间、网络延迟和数据包丢失情况。Determine the response time, network latency, and packet loss experienced when connecting to the endpoint.
  • 确定应用程序性能差是由于网络问题,还是由于应用程序提供商一端出现某种问题。Determine whether poor application performance is because of the network or because of some issue on the application provider's end.
  • 通过查看拓扑图中每个跃点造成的延迟,来查明网络中可能导致应用程序性能差的热点。Identify hot spots on the network that might be causing poor application performance by viewing the latency contributed by each hop on a topology map.

服务连接监视器

配置Configuration

若要打开网络性能监视器的配置,请打开网络性能监视器解决方案并选择“配置”。 To open the configuration for Network Performance Monitor, open the Network Performance Monitor solution and select Configure.

配置网络性能监视器

配置 Log Analytics 代理的监视功能Configure Log Analytics agents for monitoring

在用于监视的节点上启用以下防火墙规则,以便解决方案能够发现从节点到服务终结点的拓扑:Enable the following firewall rules on the nodes used for monitoring so that the solution can discover the topology from your nodes to the service endpoint:

netsh advfirewall firewall add rule name="NPMDICMPV4Echo" protocol="icmpv4:8,any" dir=in action=allow 
netsh advfirewall firewall add rule name="NPMDICMPV6Echo" protocol="icmpv6:128,any" dir=in action=allow 
netsh advfirewall firewall add rule name="NPMDICMPV4DestinationUnreachable" protocol="icmpv4:3,any" dir=in action=allow 
netsh advfirewall firewall add rule name="NPMDICMPV6DestinationUnreachable" protocol="icmpv6:1,any" dir=in action=allow 
netsh advfirewall firewall add rule name="NPMDICMPV4TimeExceeded" protocol="icmpv4:11,any" dir=in action=allow 
netsh advfirewall firewall add rule name="NPMDICMPV6TimeExceeded" protocol="icmpv6:3,any" dir=in action=allow 

创建服务连接监视器测试Create Service Connectivity Monitor tests

开始创建测试,以便监视与服务终结点建立的网络连接。Start creating your tests to monitor network connectivity to the service endpoints.

  1. 选择“服务连接监视器” 选项卡。Select the Service Connectivity Monitor tab.

  2. 选择“添加测试”并输入测试名称和说明。 Select Add Test, and enter the test name and description. 每个工作区最多可以创建 450 个测试。You can create maximum 450 tests per workspace.

  3. 选择测试类型:Select the type of test:

    • 如果要监视响应 HTTP/S 请求的服务(例如 outlook.office365.com 或 bing.com)的连接,请选择“Web”。 Select Web to monitor connectivity to a service that responds to HTTP/S requests, such as outlook.office365.com or bing.com.
    • 如果要监视响应 TCP 请求,但不响应 HTTP/S 请求的服务(例如 SQL 服务器、FTP 服务器、SSH 端口等)的连接,请选择“网络”。 Select Network to monitor connectivity to a service that responds to TCP requests but doesn't respond to HTTP/S requests, such as a SQL server, FTP server, or SSH port.
    • 例如:若要为 blob 存储帐户创建 Web 测试,请选择 Web 并输入目标为 yourstorageaccount.blob.core.chinacloudapi.cn。For example: To create a web test to a blob storage account, select Web and enter target as yourstorageaccount.blob.core.chinacloudapi.cn. 同样,可以使用此链接为其他表存储、队列存储和 Azure 文件存储创建测试。Similarly you can create tests for other table storage, queue storage and Azure Files using this link.
  4. 如果你不希望执行网络度量(例如网络延迟、数据包丢失和拓扑发现),请清除“执行网络度量” 复选框。If you don't want to perform network measurements, such as network latency, packet loss, and topology discovery, clear the Perform network measurements check box. 保持选中此项可以最大程度地利用此功能。Keep it selected to get maximum benefit from the capability.

  5. 在“目标” 中,输入要监视其网络连接的目标 URL/FQDN/IP 地址。In Target, enter the URL/FQDN/IP address to which you want to monitor network connectivity.

  6. 在“端口号”中,输入目标服务的端口号。 In Port number, enter the port number of the target service.

  7. 在“测试频率” 中,输入表示测试的运行频率的值。In Test Frequency, enter a value for how frequently you want the test to run.

  8. 选择要从中监视服务网络连接的节点。Select the nodes from which you want to monitor the network connectivity to service. 确保每次测试添加的代理数少于 150。Ensure that the number of agents added per test is less than 150. 任何代理都可以测试最多 150 个终结点/代理。Any agent can test maximum 150 endpoints/agents.

    备注

    对于基于 Windows 服务器的节点,该功能使用基于 TCP 的请求来执行网络度量。For Windows server-based nodes, the capability uses TCP-based requests to perform the network measurements. 对于基于 Windows 客户端的节点,该功能使用基于 ICMP 的请求来执行网络度量。For Windows client-based nodes, the capability uses ICMP-based requests to perform the network measurements. 在某些情况下,当节点基于 Windows 客户端时,目标应用程序会阻止传入的基于 ICMP 的请求。In some cases, the target application blocks incoming ICMP-based requests when the nodes are Windows client-based. 解决方案无法执行网络度量。The solution is unable to perform network measurements. 在这种情况下,我们建议使用基于 Windows 服务器的节点。We recommend that you use Windows server-based nodes in such cases.

  9. 如果不希望针对所选项生成运行状况事件,请清除“在此测试涵盖的目标中启用运行状况监视”。 If you don't want to create health events for the items you select, clear Enable Health Monitoring in the targets covered by this test.

  10. 选择监视条件。Choose monitoring conditions. 可以通过输入阈值,针对运行状况事件生成设置自定义阈值。You can set custom thresholds for health-event generation by entering threshold values. 每当条件值超出了其针对所选网络或子网对选择的阈值时,都会生成运行状况事件。Whenever the value of the condition goes above its selected threshold for the selected network or subnetwork pair, a health event is generated.

  11. 选择“保存” 以保存配置。Select Save to save the configuration.

    服务连接监视器测试配置

演练Walkthrough

转到“网络性能监视器”仪表板视图。Go to the Network Performance Monitor dashboard view. 若要概览创建的各个测试的运行状况,请查看“服务连接监视器” 页面。To get a summary of the health of the different tests you created, look at the Service Connectivity Monitor page.

“服务连接监视器”页

可以在“测试”页上选择磁贴来查看测试详细信息。 Select the tile to view the details of the tests on the Tests page. 在左侧的表中,可以查看所有测试的时间点运行状况,以及服务响应时间、网络延迟和数据包丢失值。In the table on the left, you can view the point-in-time health and value of the service response time, network latency, and packet loss for all the tests. 可以使用“网络状态记录器”控件查看过去另一时间的网络快照。Use the Network State Recorder control to view the network snapshot at another time in the past. 在表中选择要调查的测试。Select the test in the table that you want to investigate. 在右侧窗格中的图表中,可以查看丢包、延迟和响应时间值的历史趋势。In the charts in the pane on the right, you can view the historical trend of the loss, latency, and response time values. 可以选择“测试详细信息”链接来查看每个节点的性能。 Select the Test Details link to view the performance from each node.

服务连接监视器测试

在“测试节点”视图中,可以观察每个节点的网络连接。 In the Test Nodes view, you can observe the network connectivity from each node. 选择性能降低的节点。Select the node that has performance degradation. 这是观察到应用程序运行速度缓慢的节点。This is the node where the application is observed to be running slow.

观察应用程序响应时间与网络延迟之间的相关性,确定应用程序性能差是由于网络问题,还是由于应用程序提供商一端出现某种问题。Determine whether poor application performance is because of the network or an issue on the application provider's end by observing the correlation between the response time of the application and the network latency.

  • 应用程序问题: 如果响应时间出现峰值,但网络延迟保持一致,则表示网络正常,问题可能是由于应用程序端的问题导致的。Application issue: A spike in the response time but consistency in the network latency suggests that the network is working fine and the problem might be due to an issue on the application end.

    服务连接监视器应用程序问题

  • 网络问题: 响应时间的峰值伴随着网络延迟的相应高峰,则表示响应时间的增加可能是由于网络延迟的增加。Network issue: A spike in response time accompanied with a corresponding spike in network latency suggests that the increase in response time might be due to an increase in network latency.

    服务连接监视器网络问题

确定问题是由于网络导致的后,可以在拓扑图上选择“拓扑”视图链接来查明有问题的跃点。 After you determine that the problem is because of the network, select the Topology view link to identify the troublesome hop on the topology map. 下图中显示了一个示例。An example is shown in the following image. 节点与应用程序终结点之间的总延迟为 105 毫秒,其中,96 毫秒的延迟是带有红色标记的跃点造成的。Out of the 105-ms total latency between the node and the application endpoint, 96 ms is because of the hop marked in red. 查明有问题的跃点后,可以采取纠正措施。After you identify the troublesome hop, you can take corrective action.

服务连接监视器测试

诊断Diagnostics

如果观察到异常情况,请执行以下步骤:If you observe an abnormality, follow these steps:

  • 如果服务响应时间、网络断开和延迟显示为 NA,则问题可能是由下面一个或多个原因造成的:If the service response time, network loss, and latency are shown as NA, one or more of the following reasons might be the cause:

    • 应用程序已关闭。The application is down.
    • 用来检查服务的网络连接的节点已关闭。The node used for checking network connectivity to the service is down.
    • 在测试配置中输入的目标不正确。The target entered in the test configuration is incorrect.
    • 节点未建立任何网络连接。The node doesn't have any network connectivity.
  • 如果显示了有效的服务响应时间,但网络断开和延迟显示为 NA,则问题可能是由下面的一个或多个原因造成的:If a valid service response time is shown but network loss as well as latency are shown as NA, one or more of the following reasons might be the cause:

    • 如果用来检查服务的网络连接的节点是 Windows 客户端计算机,则原因是目标服务正在阻止 ICMP 请求,或者网络防火墙正在阻止 ICMP 来自该节点的请求。If the node used for checking network connectivity to the service is a Windows client machine, either the target service is blocking ICMP requests or a network firewall is blocking ICMP requests that originate from the node.
    • 在测试配置中,“执行网络度量”复选框为空。 The Perform network measurements check box is blank in the test configuration.
  • 如果服务响应时间为 NA 但网络断开和延迟值有效,则表示目标服务可能不是 Web 应用程序。If the service response time is NA but network loss as well as latency are valid, the target service might not be a web application. 编辑测试配置,选择“网络”而不是“Web”作为测试类型。 Edit the test configuration, and choose the test type as Network instead of Web.

  • 如果应用程序运行速度缓慢,请确定应用程序性能差是由于网络问题,还是由于应用程序提供商一端出现某种问题。If the application is running slow, determine whether poor application performance is because of the network or an issue on the application provider's end.

后续步骤Next steps

搜索日志以查看详细的网络性能数据记录。Search logs to view detailed network performance data records.