Splunk Search

How to find the top 10 events within 24 hours?

N0Excuse_
New Member

Hi, I am new to Splunk, I would like to create a command where it can find top 10 events happened within 24 hours. 

index="name"  events =*| top 10 User | stats count(User) as Count by User | sort - Count | head 10 

 

Labels (2)
0 Karma

jotne
Builder

Do you like top 10 events per user?

 

index="name"  events =*
| stats count by host events
| sort  host -count
| streamstats count as counter by host
| where counter<11
| fields - counter

 

0 Karma

yuanliu
SplunkTrust
SplunkTrust

What is the question?  | top 10 User will return ten most populous users and sort in reverse numeric order.  You don't need to count the output.  Are you not getting that with just | top 10 User?

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...