All Apps and Add-ons

Top 3 values by Application Name

accgarima
New Member

i have multiple Application names and the requirement is that for each application i need to find Top 3 values (which mean I need the top 3 greatest number for that application and NOT the no. of occurences)
something like this;

Say my input is like

Application Value


A 9
A 8
A 1
A 7
A 7
A 6
B 11
B 9
B 7
B 5
B 4
B 4
C 18
C 17
C 17
C 11
C 9
C 15

and I want the oUTPUT to be like this :

Application Value


A 9
A 8
A 7
B 11
B 9
B 7
C 18
C 17
C 15

Please let me know how to proceed with this. I tried with the top and head command which were not giving the expected result.

Tags (1)
0 Karma

cmerriman
Super Champion

try something like:

...|sort 0 Application - Value|streamstats count by Application|search count<=3|fields - count
0 Karma
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 ...