6

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?

user878980
  • 187
  • 2
  • 8

1 Answers1

12

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
Yoni L.
  • 22,627
  • 2
  • 29
  • 48