Splunk Search

Top command based on lookup result

bugnet
Path Finder

The following search will give the count of attacks by attacker_IP and destination branch.

index=waf   Name=block | lookup Branches IP AS dest OUTPUTNEW branch | stats count by src branch | sort -count

Now I just want to show the top 10 attacker IPs per Branch based on their high count.

Help is always appreciated.

Thanks!!

Tags (1)
0 Karma

HiroshiSatoh
Champion

try this!

 index=waf   Name=block | lookup Branches IP AS dest OUTPUTNEW branch | stats count by src branch | sort branch .- count|dedup 10 branch 
0 Karma

richgalloway
SplunkTrust
SplunkTrust

I think the top command will do that. Try this

index=waf   Name=block | lookup Branches IP AS dest OUTPUTNEW branch | stats count by src branch | sort -count | top limit=10 count by branch
---
If this reply helps you, Karma would be appreciated.

bugnet
Path Finder

Not working for me.

0 Karma
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...