Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Kusto\KQL - Render timechart for simple count value

I have a kql-query which calculates number of uploaded BLOBS in Azure storage since last 24 hours. The query blow returns a number as expected when run in Azure log analytics.

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

I want now to visualise this information in a timechart to get some detailed view. Have tried to add "render timechart" to the query chain as follows

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

When executing the query however, i am getting the error message;

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

Any tips to how this can be accomplished?

like image 911
user878980 Avatar asked Jul 18 '26 18:07

user878980


1 Answers

if you wish to look at the data aggregated at an hourly resolution (for example) and rendered as a timechart, you could try this:

StorageBlobLogs
| where TimeGenerated > ago(1d) and OperationName has "PutBlob" and StatusText contains "success"
| summarize dcount(Uri) by bin(TimeGenerated, 1h)
| render timechart
like image 83
Yoni L. Avatar answered Jul 22 '26 16:07

Yoni L.



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!