Skip to content

Instantly share code, notes, and snippets.

@ArthurSteijn
Last active August 15, 2020 09:00
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/edf3e9145836c95c39258b3ffaf1d09f to your computer and use it in GitHub Desktop.
Save ArthurSteijn/edf3e9145836c95c39258b3ffaf1d09f 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 OperationName !hasprefix "Discover" and OperationName !hasprefix "VertiPaq" and OperationName !hasprefix "LogMetric"
| where TimeGenerated > ago(14d);
window
| extend DurationMs=extract(@"([^,]*)", 1,Duration_s, typeof(long))
| project TimeGenerated,RootActivityId_g, ResourceId, OperationName, DatabaseName_s, level_d, EventClass_s, EventSubclass_s, StartTime_t, EndTime_t, ProgressTotal_s, ObjectReference_s, ObjectName_s, ObjectID_s, ObjectPath_s, Duration_s, CPUTime_s, Severity_s, Success_s, Error_s, TextData_s,DurationMs
| order by TimeGenerated desc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment