Splunk Search

Top by a value inside the query

timbCFCA
Path Finder

Within each record in a query I have two fields, c_ip and cs_bytes which is numeric. How can I get the top 10 c_ip values for the highest sum total of the cs_bytes field? The direction I've tried is a stats sum(cs_bytes) by c_ip.

Tags (1)
1 Solution

Stephen_Sorkin
Splunk Employee
Splunk Employee

You can search:

... | stats sum(cs_bytes) as bytes by c_ip | sort - bytes | head 10

View solution in original post

Stephen_Sorkin
Splunk Employee
Splunk Employee

You can search:

... | stats sum(cs_bytes) as bytes by c_ip | sort - bytes | head 10
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...