Skip to content

Instantly share code, notes, and snippets.

@ArthurSteijn
Last active August 15, 2020 08:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ArthurSteijn/a0b00e3ba4cd013d9519449dcb3fe992 to your computer and use it in GitHub Desktop.
Save ArthurSteijn/a0b00e3ba4cd013d9519449dcb3fe992 to your computer and use it in GitHub Desktop.
Query for Azure Analysis Services Diagnostics Logs in Kusto Query Language
let window = AzureDiagnostics
| where ResourceProvider == "MICROSOFT.ANALYSISSERVICES" and Resource =~ "<MyServerName>" and DatabaseName_s =~ "<MyDatabaseName>"
| where TimeGenerated > ago(14d);
window
| where OperationName has "CommandEnd" and TextData_s has "<Refresh "
| extend DurationMs=extract(@"([^,]*)", 1,Duration_s, typeof(long))
| project StartTime_t,EndTime_t,ServerName_s,OperationName,RootActivityId_g,TextData_s,DatabaseName_s,ApplicationName_s,Duration_s,Success_s,EffectiveUsername_s,User_s,EventSubclass_s,DurationMs
| order by StartTime_t desc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment