Splunk Search

How to get the sourcetype count by each source top 10 events counts

harishsplunk7
Explorer

I need to get the  sourcetype count by each source top 10 events counts in splunk

Example : 

I have 3 sourcetype and sending data from different sources, 

sourcetype A - a,b,c,d,e

sourcetype B -a,b,c,d,e

sourcetype C -a,b,c,d,e

Now, I need to display top 10 event count by each source by sourcetype

0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust
| stats count by sourcetype source
| sort 0 sourcetype -count
| streamstats count as rank by sourcetype
| where rank <= 10

View solution in original post

ITWhisperer
SplunkTrust
SplunkTrust
| stats count by sourcetype source
| sort 0 sourcetype -count
| streamstats count as rank by sourcetype
| where rank <= 10

harishsplunk7
Explorer

Thank you so much!!!

0 Karma

yuanliu
SplunkTrust
SplunkTrust

Can you elaborate what you are looking for?  Maybe illustrate what the end result looks like, and explain what each box means.

0 Karma
Get Updates on the Splunk Community!

Splunk Smartness with Brandon Sternfield | Episode 3

Hello and welcome to another episode of "Splunk Smartness," the interview series where we explore the power of ...

Monitoring Postgres with OpenTelemetry

Behind every business-critical application, you’ll find databases. These behind-the-scenes stores power ...

Mastering Synthetic Browser Testing: Pro Tips to Keep Your Web App Running Smoothly

To start, if you're new to synthetic monitoring, I recommend exploring this synthetic monitoring overview. In ...