Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save TheCloudScout/3f12a825d51cc7b85e0277cc720b8621 to your computer and use it in GitHub Desktop.
Save TheCloudScout/3f12a825d51cc7b85e0277cc720b8621 to your computer and use it in GitHub Desktop.
let AlertLogs = _GetWatchlist("AlertLogs")
| extend AlertDateTime = todatetime(strcat(AlertDate, AlertTime))
| project AlertDateTime, AlertName, UID;
let JunosLogs = _GetWatchlist("JunosLogs")
| extend JunosDateTime = todatetime(strcat(Date, Time))
| project JunosDateTime, Action, UID=UID_;
// JunosLogs
AlertLogs
| join kind=leftouter JunosLogs on UID
| sort by AlertDateTime
| summarize arg_max(AlertDateTime, JunosDateTime, *) by UID
| where abs(datetime_diff('minute', AlertDateTime, JunosDateTime)) > 5 or isempty(JunosDateTime)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment