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!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...