Splunk Search

How to get top results for a particular field

samsplunkd
Path Finder

Hi,

I have a field called API with various different values and all the stats for those APIs are summary indexed. I want to extract results for top 5 APIs and then I want to perform operations only on those results.
When I use "top", it suppresses the other fields(results), shows some stats (count, %) and I cannot perform any other operation once top is used.

Is there a way I can extract all the results for top 5 APIs and retain the log entry as well to perform other operations on other fields associated with those APIs.

Thanks

0 Karma

Ayn
Legend

Basically this is a classic example of when you can use a subsearch, but there are some other clever ways of doing this, too. This question and its answers seems relevant to what you're asking: http://splunk-base.splunk.com/answers/69877/show-parent-query-and-subquery-at-the-same-time

0 Karma
Get Updates on the Splunk Community!

Upcoming Webinar: Unmasking Insider Threats with Slunk Enterprise Security’s UEBA

Join us on Wed, Dec 10. at 10AM PST / 1PM EST for a live webinar and demo with Splunk experts! Discover how ...

.conf25 technical session recap of Observability for Gen AI: Monitoring LLM ...

If you’re unfamiliar, .conf is Splunk’s premier event where the Splunk community, customers, partners, and ...

A Season of Skills: New Splunk Courses to Light Up Your Learning Journey

There’s something special about this time of year—maybe it’s the glow of the holidays, maybe it’s the ...