NWConnectionMonitorTestResult 表的查询

有关在 Azure 门户中使用这些查询的信息,请参阅 Log Analytics 教程。 有关 REST API,请参阅查询

失败的测试

获取每个资源的不同失败源、目标、测试组和测试配置。

NWConnectionMonitorTestResult 
| where TimeGenerated > ago(24h) 
| where TestResult == "Fail"
| distinct _ResourceId, SourceName, DestinationName, TestGroupName, TestConfigurationName

测试性能

获取资源的给定源和目标之间的损失百分比和平均延迟。

// For specific results, insert values in the let statements and uncomment the where filters within the query
// let connectionMonitorResourceId = "<Connection Monitor Resource Id>";
// let sourceName = "<Source Name>";
// let destinationName = "<Destination Name>";
// let testGroupName = "<Test Group Name>";
// let testConfigurationName = "<Test Configuration Name>";
NWConnectionMonitorTestResult 
| where TimeGenerated > ago(24h) 
// | where ConnectionMonitorResourceId has connectionMonitorResourceId
// | where SourceName has sourceName
// | where DestinationName has destinationName
// | where TestGroupName has testGroupName
// | where TestConfigurationName has testConfigurationName
| extend LossPercent = ChecksFailed * 100 / ChecksTotal
| project TimeGenerated, ConnectionMonitorResourceId, TestResult, AvgRoundTripTimeMs, LossPercent, SourceName, SourceAddress, DestinationName, DestinationAddress
| order by TimeGenerated desc;