Forum Discussion
Jan_F1801
Nov 19, 2021Copper Contributor
Show only last status of a service
I am trying to write a query that shows me on which VM a service is not running. The basic framework is quite easy to find on the net: Event | where TimeGenerated >ago(1d) | where EventLog == ...
- Nov 22, 2021You can use arg_max() - simplified example:
Event
| where TimeGenerated >ago(1d)
| where EventLog == "System"
| summarize arg_max(TimeGenerated, EventID, Computer)
Clive_Watson
Nov 22, 2021Bronze Contributor
You can use arg_max() - simplified example:
Event
| where TimeGenerated >ago(1d)
| where EventLog == "System"
| summarize arg_max(TimeGenerated, EventID, Computer)
Event
| where TimeGenerated >ago(1d)
| where EventLog == "System"
| summarize arg_max(TimeGenerated, EventID, Computer)