Forum Discussion

Jan_F1801's avatar
Jan_F1801
Copper Contributor
Nov 19, 2021
Solved

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 == ...
  • Clive_Watson's avatar
    Nov 22, 2021
    You can use arg_max() - simplified example:


    Event
    | where TimeGenerated >ago(1d)
    | where EventLog == "System"
    | summarize arg_max(TimeGenerated, EventID, Computer)

Resources