如何在 KQL 中绘制预先平均的时间序列数据而不使用 Summarize?

问题描述 投票:0回答:1

我目前正在创建一个仪表板图,我的目标是在时间表上绘制两个不同的系列。所讨论的两个系列由我的数据集中的

processingRate
inputRate
列表示。

每个系列都代表在指定时间间隔(例如每 5 秒)内已平均的速率。结果,数据已经是我想要可视化的形式了,我不需要进一步聚合它。

我的挑战是绘制这些预先平均的比率,而不在一段时间内应用额外的箱汇总,因为这会扭曲已经平均的数据。

如何实现这一目标并在同一时间表上显示两个系列,而无需进一步的时间分箱或汇总?任何建议或见解将不胜感激。

我的伪代码如下所示:

// Join the tables and render the timechart
let AnalysisTbl = InputRateAnalysisTbl
    | join kind=inner ProcessingRateAnalysisTbl on applicationId_s, TimeGenerated
    | project inputRate, processingRate, applicationId_s, TimeGenerated;
AnalysisTbl
| render timechart with x-axis being TimeGenerated and y-axis being inputRate and processingRate
azure plot time-series kql azure-log-analytics
1个回答
0
投票

好的,我找到了答案。最后我必须协调两个表

InputRateAnalysisTbl
ProcessingRateAnalysisTbl
。然后使用联合运算符就可以了。

let InputRateAnalysisTbl = SparkMetric_CL
    | where clusterName_s contains "Name"
    | where metric_type_s == "Meter"
    | extend rateName = "inputRate"
    | extend rate = m1_rate_d
    | project rateName,rate, applicationId_s, TimeGenerated, name_s;

let ProcessingRateAnalysisTbl = SparkMetric_CL
    | where clusterName_s contains "Name"
    | where metric_type_s == "Meter"
    | extend rateName = "processRate"
    | extend rate = m1_rate_d
    | project rateName, rate, applicationId_s, TimeGenerated, name_s;

union InputRateAnalysisTbl, ProcessingRateAnalysisTbl
| order by TimeGenerated asc
| render timechart 
© www.soinside.com 2019 - 2024. All rights reserved.