Splunk Search

How to get top 10 values in splunk search ?

kavyaa
Explorer

Hi,
I want to get top 10 src_ip . I have selected descending order for recv_bytes column .
Please help me.
Query as follows
source="F:\Splunk_Log Files\*" status ="Allow" src_ip | stats sum(recv_bytes) by src_ip .
alt text

Tags (2)
0 Karma
1 Solution

martin_mueller
SplunkTrust
SplunkTrust

Are you looking for this?

source="F:Splunk_Log Files*" status ="Allow" src_ip | stats sum(recv_bytes) as sum_recv_bytes by src_ip | sort - sum_recv_bytes | head 10

View solution in original post

richgalloway
SplunkTrust
SplunkTrust
source="F:Splunk_Log Files*" status ="Allow" src_ip | stats sum(recv_bytes)  as Bytes by src_ip | top limit=10 Bytes
---
If this reply helps you, Karma would be appreciated.

martin_mueller
SplunkTrust
SplunkTrust

Are you looking for this?

source="F:Splunk_Log Files*" status ="Allow" src_ip | stats sum(recv_bytes) as sum_recv_bytes by src_ip | sort - sum_recv_bytes | head 10
Get Updates on the Splunk Community!

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer Certification at ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

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