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!

Simplifying the Analyst Experience with Finding-based Detections

    Splunk invites you to an engaging Tech Talk focused on streamlining security operations with ...

[Puzzles] Solve, Learn, Repeat: Word Search

This challenge was first posted on Slack #puzzles channelThis puzzle is based on a letter grid containing ...

[Puzzles] Solve, Learn, Repeat: Advent of Code - Day 4

Advent of CodeIn order to participate in these challenges, you will need to register with the Advent of Code ...