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!

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

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 ...

Combine Multiline Logs into a Single Event with SOCK: a Step-by-Step Guide for ...

Combine multiline logs into a single event with SOCK - a step-by-step guide for newbies Olga Malita The ...