【发布时间】:2021-02-03 20:33:18
【问题描述】:
任何人都可以帮助从下表数据构建 kusto 查询:
| ProcessName | ProcessID | TimeStamp | Status |
|---|---|---|---|
| abc | 101 | 11:45:06 | Queued |
| xyz | 102 | 11:45:51 | Queued |
| abc | 101 | 11:45:57 | Progress |
| abc | 101 | 11:47:28 | Succeeded |
| abc | 103 | 11:48:51 | Queued |
| abc | 103 | 11:49:57 | Progress |
| abc | 103 | 11:50:28 | Succeeded |
我想得到作为查询结果处于排队状态的xyz值,条件是超过5m处于排队状态。
这是我一直在尝试但没有成功的方法。
let Events = MyLogTable | where ... ;
Events
| where Status == "Queued"
| project ProcessName, ProcessId, StartTime=TimeStamp
| join (Events
| where Status !in ("InProgress","Succeeded")
| project ProcessId)
on ProcessId
| where StartTime>ago(5m)
| project ProcessName, ProcessId, StartTime, Status
非常感谢任何帮助,在此先感谢。
【问题讨论】: