Getting Data In

How do I generate a report listing x sample events for each Windows event code?

vhaabqdeltoj
New Member

I need to generate a report showing X entries for each type of Windows event code I have. The report would look something like:

Event Code: X (say 4624 for example)

<most recent event with an Event Code of 4624>
<second most recent event and Event Code of 4624>
<<n> most recent event with an Event Code of 4624> where <n> is equal to X above (say 10 for example)

Event Code: Y (say 4625 for example)

<most recent event with an Event Code of 4624>
<second most recent event and Event Code of 4624>
<<n> most recent event with an Event Code of 4624> where <n> is equal to X above (say 10 for example)

0 Karma

sundareshr
Legend

Like this

| streamstats count by EventCode | stats count list(Message) by EventCode | where count <= 5
0 Karma

vhaabqdeltoj
New Member

Thank you. That was very helpful but it left me with one little perplexing problem. During the search, it displays the EventCode and the messages. It looks perfect. Then it gets to "finalizing search". When the search become final, it erases the display and says "no results found". There are events and I could see the results as it was building the search. Any ideas why this happens?

0 Karma
Get Updates on the Splunk Community!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...