Kusto\KQL - 简单计数值的渲染时间表

Kusto\KQL - Render timechart for simple count value

我有一个 kql 查询,它计算自过去 24 小时以来在 Azure 存储中上传的 BLOBS 数量。 当在 Azure 日志分析中 运行 时,查询吹 returns 一个预期的数字。

StorageBlobLogs
| where TimeGenerated > ago(1d) and OperationName has "PutBlob" and StatusText contains "success" a
| distinct Uri
| summarize count()

我现在想在时间表中可视化此信息以获得一些详细视图。已尝试将“render timechart”添加到查询链中,如下所示

StorageBlobLogs
| where TimeGenerated > ago(1d) and OperationName has "PutBlob" and StatusText contains "success" a
| distinct Uri
| summarize count()
| render timechart

但是,在执行查询时,我收到了错误消息;

Failed to create visualization The Stacked bar chart can't be created as you are missing a column of one of the following types: int, long, decimal or real

关于如何实现这一点的任何提示?

如果您希望查看按小时分辨率聚合的数据(例如)并呈现为时间表,您可以试试这个:

StorageBlobLogs
| where TimeGenerated > ago(1d) and OperationName has "PutBlob" and StatusText contains "success"
| summarize dcount(Uri) by bin(TimeGenerated, 1h)
| render timechart