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!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...