我如何编写我的查询,以适当的格式创建数据结果,以便使用| render timechart with (ysplit=panels)输出在多个拼板上绘制?
看一下微软的例子,我需要让我的IPPrefix列在一行中产生多列。相反,我的查询为IPPrefix中的每个分组生成单独的行。
我有以下疑问:
let startTime = datetime('2020.07.23 20:00:00');
let endTime = datetime('2020.07.23 23:59:00');
AzureDiagnostics
| where TimeGenerated between (startTime..endTime)
| where ResourceType == "APPLICATIONGATEWAYS" and OperationName == "ApplicationGatewayAccess"
| where requestUri_s contains "api/auth/ping"
| extend IPParts = split(clientIP_s, '.')
| extend IPPrefix = strcat(IPParts[0], '.', IPParts[1], '.', IPParts[2])
| make-series Count = count() on TimeGenerated in range(startTime, endTime, 5m) by IPPrefix
//| summarize AggregatedValue = count() by IPPrefix, bin(TimeGenerated, 1m)
| render timechart with (ysplit=panels)我希望结果看起来像这样:

但是,所有y系列都绘制在单个面板中,如下所示:

我想我没有以正确的方式使用make-series来产生我需要的结果,但是我没有能够以不同的方式应用它来使它工作。
发布于 2020-07-25 21:59:43
我意识到在渲染之前我需要以数据为中心。我还了解到ysplit=panels选项有5个面板的限制。我必须将序列限制为5个,然后对聚合数据执行透视。
...
| make-series Count = count() on TimeGenerated in range(startTime, endTime, 1m) by IPPrefix
| take 5
| evaluate pivot(IPPrefix, any(Count), TimeGenerated)
| render timechart with(ysplit=panels)带有五个面板的结果图表。

https://stackoverflow.com/questions/63074864
复制相似问题