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!

Unlock Database Monitoring with Splunk Observability Cloud

  In today’s fast-paced digital landscape, even minor database slowdowns can disrupt user experiences and ...

Purpose in Action: How Splunk Is Helping Power an Inclusive Future for All

At Cisco, purpose isn’t a tagline—it’s a commitment. Cisco’s FY25 Purpose Report outlines how the company is ...

[Upcoming Webinar] Demo Day: Transforming IT Operations with Splunk

Join us for a live Demo Day at the Cisco Store on January 21st 10:00am - 11:00am PST In the fast-paced world ...