Splunk Search

When you feed multiple field names to the top command, what results are returned exactly?

jli001
Explorer

According to Splunk documentation for the top command, it is acceptable to have multiple fields (separated by commas) as arguments. For example:

search something | top host_ip, username

But my brain is having a hard time understanding what that actually does. To me, "top" implies that you are trying to sort the search results by the frequency of each unique value in one field and displays on the top X most frequently occurring values of that field. When you feed multiple field names to the top command, what results are returned exactly?

Tags (1)
1 Solution

stephanefotso
Motivator

Hello/
The top command Finds the most frequent tuple of values of all fields in the field list, along with a count and percentage. Means search something | top host_ip, username, will find the most frenquent values of the field host_ip , and the most frequent values of the field username

If the optional by-clause is provided, top will find the most frequent values for each distinct tuple of values of the group-by fields. http://docs.splunk.com/Documentation/Splunk/6.2.3/SearchReference/Top

Thanks

SGF

View solution in original post

stephanefotso
Motivator

Hello/
The top command Finds the most frequent tuple of values of all fields in the field list, along with a count and percentage. Means search something | top host_ip, username, will find the most frenquent values of the field host_ip , and the most frequent values of the field username

If the optional by-clause is provided, top will find the most frequent values for each distinct tuple of values of the group-by fields. http://docs.splunk.com/Documentation/Splunk/6.2.3/SearchReference/Top

Thanks

SGF

jli001
Explorer

That's exactly it! To test this answer I have created a lookup file and ran top against different combinations of fields. The top command behaved as stephanefotso described.

0 Karma
Get Updates on the Splunk Community!

Enhance Security Visibility with Splunk Enterprise Security 7.1 through Threat ...

(view in My Videos)Struggling with alert fatigue, lack of context, and prioritization around security ...

Troubleshooting the OpenTelemetry Collector

  In this tech talk, you’ll learn how to troubleshoot the OpenTelemetry collector - from checking the ...

Adoption of Infrastructure Monitoring at Splunk

  Splunk's Growth Engineering team showcases one of their first Splunk product adoption-Splunk Infrastructure ...