Splunk Search

how to find most popular field over time ?

tariqazeem123
New Member

i have data in default index "main" and has sourcetype "app" and field like program_name.

i want to find most popular programmes over time. can anybody please help me with this ?

0 Karma
1 Solution

snigdhasaxena
Communicator

Hi @tariqazeem123 ,

There are 2 ways:
1. You can run your command and use sort command
index=main sourcetype=app | sort program_name by _time

2.You can use top command and you can limit it to no. of events you want

index=main sourcetype=app | top limit=0 program_name

View solution in original post

0 Karma

snigdhasaxena
Communicator

Hi @tariqazeem123 ,

There are 2 ways:
1. You can run your command and use sort command
index=main sourcetype=app | sort program_name by _time

2.You can use top command and you can limit it to no. of events you want

index=main sourcetype=app | top limit=0 program_name

0 Karma

amitm05
Builder

Hi @tariqazeem123
You would like to use the top command for this -

index=main sourcetype=app| top limit=0 program_name 

Let me know if there is more to your query. Thanks

0 Karma
Get Updates on the Splunk Community!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...