【问题标题】:I need a query to measure network bandwidth utilization in Azure using KQL我需要一个查询来使用 KQL 在 Azure 中测量网络带宽利用率
【发布时间】:2021-08-11 21:17:43
【问题描述】:

首先,我是 KQL 的新手。我正在尝试编写一个查询,为我提供我的 VM 的整体网络利用率。

以下是我目前拥有的:

Perf
| where ObjectName == "Network Interface"
| where Computer startswith "T1"
| where CounterPath contains "Bytes Received"or
    CounterPath contains "Current Bandwidth"
| project Computer, ObjectName, CounterName, CounterValue, CounterPath
| sort by Computer
| summarize avg(CounterValue) by Computer, CounterName

它为每台计算机返回两行数据(一行用于接收的字节数,一行用于当前带宽)

我需要完成的是将每台计算机的两行数据与方程 ((Total Bytes\Sec * 8)/current bandwidth) * 100 结合起来 - 这应该为每台计算机生成一个数据点。

有人可以帮我完成这个吗?

【问题讨论】:

    标签: azure bandwidth azure-data-explorer


    【解决方案1】:

    您可以尝试使用avgif() aggregation function。例如:

    Perf
    | where ObjectName == "Network Interface"
    | where Computer startswith "T1"
    | where CounterPath has "Bytes Received" or CounterPath has "Current Bandwidth"
    | summarize avg_BytesReceived = avgif(CounterValue, CounterPath has "Bytes Received"),
                avg_CurrentBandwidth = avgif(CounterValue, CounterPath has "Current Bandwidth")
             by Computer
    | project Computer, Result = 100.0 * avg_BytesReceived * 8 / avg_CurrentBandwidth
    

    【讨论】:

      猜你喜欢
      • 2021-10-16
      • 1970-01-01
      • 2022-01-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-03-24
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多