gui*_*lem 6 azure azure-log-analytics
在Azure 新的日志分析查询平台中,您可以查询性能计数器并汇总它们以最终创建一个漂亮的图表。
按照多维文档示例,它说
by 子句中的多个表达式创建多行,每个值组合对应一个行。
我想在他们的示例数据库中查询每台计算机发送和接收的网络字节数。从这个查询开始它应该是这样的
Perf
| where TimeGenerated > ago(1d)
| where (CounterName == "Bytes Received/sec" or CounterName == "Bytes Sent/sec")
| summarize avg(CounterValue) by bin(TimeGenerated, 1h), Computer, CounterName
| extend Threshold = 20
| render timechart
问题是Send 和 Received 字节在计算机级别的图形中被分组。
如何按照文档中的说明表示多个维度,以便我将Computer X Bytes Send和Computer X Bytes Received而不是将它们组合在一起,这没有任何意义?
更不用说在以前的版本中这是按预期工作的。
我认为,如果没有真正接受多个维度,则字符串连接可以解决问题。在我看来有点骇人听闻,但确实如此。
Perf
| where (CounterName == "Bytes Received/sec" or CounterName == "Bytes Sent/sec") and InstanceName matches regex "^Microsoft Hyper-V Network Adapter.*$"
| summarize avg(CounterValue) by strcat(Computer, " ", CounterName), bin(TimeGenerated, 10s)
| render timechart
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3724 次 |
| 最近记录: |