gpt4 book ai didi

具有多个维度的 Azure 日志分析时间表

转载 作者:行者123 更新时间:2023-12-01 13:30:14 25 4
gpt4 key购买 nike

Azure new log analytics query platform您可以查询性能计数器并汇总它们,最终创建一个漂亮的图表。

遵循multiple dimensions documentation example它说

Multiple expressions in the by clause creates multiple rows, one for each combination of values.

我想查询他们的示例数据库以了解每台计算机发送和接收的网络字节。从 this query 开始应该是这样的


性能
|其中 TimeGenerate > ago(1d)
|其中(CounterName ==“接收的字节数/秒”或 CounterName ==“发送的字节数/秒”)
|按 bin(TimeGenerated, 1h)、计算机、CounterName 汇总 avg(CounterValue)
|延长阈值 = 20
|渲染时间表

问题在于发送和接收的字节在计算机级别的图表中分组

如何按照文档中所述表示多个维度,以便我将“计算机发送的 X 字节”和“接收的计算机 X 字节”而不是将它们组合在一起?有什么意义吗?

Bytes send and received get mixed in the graph

更不用说在以前的版本中这可以按预期工作。

最佳答案

我认为,如果多个维度没有被真正接受,那么字符串连接就可以解决问题。在我看来有点老套,但确实如此。

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

关于具有多个维度的 Azure 日志分析时间表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46305527/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com