Azure Updates
This update describes Azure Log Analytics and Application Insights query language syntax recommendations for Summarize and Join operators. Existing syntax is still supported, but we strongly recommend that you modify your query syntax where applicable in saved searches and alerts, to avoid result ambiguity.
For questions about these recommendations, contact us.
Currently, data aggregated by datetime key is automatically grouped into hourly bins. In this example, the TimeGenerated column used in the Summarize operator has been automatically rounded to hourly bins:
SecurityEvent
| where TimeGenerated > ago(1d)
| where EventID == 4625
| summarize count() by TimeGenerated
Here are the query results:
|
TimeGenerated [UTC] |
count_ |
|
2018-02-04T09:00:00.000 2018-02-04T10:00:00.000 2018-02-04T11:00:00.000 2018-02-04T12:00:00.000 2018-02-04T13:00:00.000 2018-02-04T14:00:00.000 2018-02-04T15:00:00.000 2018-02-04T16:00:00.000 2018-02-04T17:00:00.000 2018-02-04T18:00:00.000 |
1,205 1,268 1,234 1,173 1,007 1,042 1,041 1,049 1,090 1,113 |
Recommended actions:
Currently, the language syntax allows the use of ambiguous equality expressions as Join attributes (for example, key1 == key2) that yield undesired results. We recommend that you change ambiguous equality expressions to avoid this behavior.
Here's an example of an ambiguous Join expression (summing the daily session duration per computer):
SecurityEvent
| where EventID == 4624
| join kind= inner (
SecurityEvent
| where EventID == 4634
) on TargetLogonId == TargetLogonId
| extend Duration = LogoffTime - LogonTime
| summarize sum(Duration) by bin(LogonTime, 1d), Computer
Recommended actions:
$left and $right notations. Examples:| join … on $left.Col1 == $right.Col2
| join … on X (equivalent to: | join … on $left.X == $right.X)