Splunk Search

How to show top 3 wbrs blocked domains per month

stawasen
New Member

Hi,
I would like to get the top 3 wbrs blocked domains with a value below -6.2 prestented by each month for the last 12 months.

I have got the results that I want for the current month with the following line:
dest_domain!="-" action=block dest_domain="*" (x_wbrs_score<"-6.2") | top 3 dest_domain

Thanks by advance.

Tags (1)
0 Karma
1 Solution

sdaniels
Splunk Employee
Splunk Employee

I don't have the same data but using the bucket command should get you what you are looking for.

Assume you have a custom time looking at the last 6 months or whatever (in months)

dest_domain!="-" action=block dest_domain="*" (x_wbrs_score<"-6.2") | bucket _time span=1mon | stats count(dest_domain) by dest_domain, _time | top 3 showperc=false dest_domain by _time

View solution in original post

0 Karma

sdaniels
Splunk Employee
Splunk Employee

I don't have the same data but using the bucket command should get you what you are looking for.

Assume you have a custom time looking at the last 6 months or whatever (in months)

dest_domain!="-" action=block dest_domain="*" (x_wbrs_score<"-6.2") | bucket _time span=1mon | stats count(dest_domain) by dest_domain, _time | top 3 showperc=false dest_domain by _time

0 Karma

stawasen
New Member

Thanks again! I changed the original syntax slightly and got the percentage numbers in relation to the overall blocked dest_domains for each month.

dest_domain!="-" action=block dest_domain="*" (x_wbrs_score<"-6.2" ) | bucket _time span=1month | top dest_domain by _time limit="3" showcount=false

0 Karma

sdaniels
Splunk Employee
Splunk Employee

Just take out the showperc=false and that will give you a percent value for each of the top 3. You can also use the 'useother=true' parameter and it will insert another row for each time bucket called OTHER that will show the percentage of the remaining data over that time.

| top 3 useother=true clientip by _time

0 Karma

stawasen
New Member

Thanks for your reply! I get the requested information, I have a follow-up question based on what I get for the current month. How do I get the percentage of the top 3 destination domains in relation to the rest for each month?

0 Karma

sdaniels
Splunk Employee
Splunk Employee

Did that work for you?

0 Karma
Get Updates on the Splunk Community!

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

What are Community Office Hours? Community Office Hours is an interactive 60-minute Zoom series where ...

[Puzzles] Solve, Learn, Repeat: Reprocessing XML into Fixed-Length Events

This challenge was first posted on Slack #puzzles channelFor a previous puzzle, I needed a set of fixed-length ...

Data Management Digest – December 2025

Welcome to the December edition of Data Management Digest! As we continue our journey of data innovation, the ...