Splunk Search

How to pull latest event

eb1929
Explorer

I have a search/dash board that will show data over the last 30 days, the search is as followed 

index=server EventCode=5829
| stats count by ComputerName, Domain, Machine_SamAccountName, Machine_Operating_System 

this search will give me roughly 70~ events a month, the problem is now my customer would like to have the time stamp put on the table, (which is easy by putting just the "_time" field in there) my problem that I am running into is that it will give me 10,000 results now! I showed the customer this and they said it would be fine for me to show just the latest event in the last 30 days for each Machine_SamAccountName. 

 

My question is how???? 

Labels (2)
Tags (2)
0 Karma
1 Solution

richgalloway
SplunkTrust
SplunkTrust

Does this fulfill the requirements?

index=server EventCode=5829
| stats count, latest(_time) as _time by ComputerName, Domain, Machine_SamAccountName, Machine_Operating_System 
---
If this reply helps you, Karma would be appreciated.

View solution in original post

richgalloway
SplunkTrust
SplunkTrust

Does this fulfill the requirements?

index=server EventCode=5829
| stats count, latest(_time) as _time by ComputerName, Domain, Machine_SamAccountName, Machine_Operating_System 
---
If this reply helps you, Karma would be appreciated.
Get Updates on the Splunk Community!

AI for AppInspect

We’re excited to announce two new updates to AppInspect designed to save you time and make the app approval ...

App Platform's 2025 Year in Review: A Year of Innovation, Growth, and Community

As we step into 2026, it’s the perfect moment to reflect on what an extraordinary year 2025 was for the Splunk ...

Operationalizing Entity Risk Score with Enterprise Security 8.3+

Overview Enterprise Security 8.3 introduces a powerful new feature called “Entity Risk Scoring” (ERS) for ...