Getting Data In

Get top 20 countries from Cisco ASA events

madstylex
New Member

Hi,

I am searching my Cisco ASA logs to count where an IP originates from by country.

It looks like this:

eventtype= | iplocation src_ip | stats count by Country

It works well to give me a count of all the countries, but I can't get it to give me the top 20 only. I have tried multiple combinations of the 'top' and 'head'

I don't want to just choose 20 results per page as I need to generate reports for this.

Can anyone help me out?

0 Karma
1 Solution

renjith_nair
Legend

Try

eventtype= | iplocation src_ip | stats count by Country|sort 20 - count
---
What goes around comes around. If it helps, hit it with Karma 🙂

View solution in original post

renjith_nair
Legend

Try

eventtype= | iplocation src_ip | stats count by Country|sort 20 - count
---
What goes around comes around. If it helps, hit it with Karma 🙂

madstylex
New Member

This worked, thanks

0 Karma

javiergn
Super Champion

You can try this instead:

eventtype= | iplocation src_ip | top limit=20 Country
0 Karma
Get Updates on the Splunk Community!

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 ...

Splunk APM: New Product Features + Community Office Hours Recap!

Howdy Splunk Community! Over the past few months, we’ve had a lot going on in the world of Splunk Application ...

Index This | Forward, I’m heavy; backward, I’m not. What am I?

April 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...