KQL return Security Event ID's and their count by computer

Viewed 41
1 Answers

you could try using the count() aggregation function, with both Computer and EventId as the aggregation keys:

SecurityEvent
| where Timestamp > ago(12h)
| summarize count() by Computer, EventId

or, based on my understanding of the later comment, you could try this:

SecurityEvent
| where Timestamp > ago(12h)
| summarize count() by Computer, EventId
| summarize count_by_event_id = make_bag(pack(tostring(EventId), count_)) by Computer
Related