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!

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...

.conf24 | Personalize your .conf experience with Learning Paths!

Personalize your .conf24 Experience Learning paths allow you to level up your skill sets and dive deeper ...

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...