Splunk Search

Multiple top results against IP address

Rhin0Crash
Path Finder

Alright this may seem like a trivial question for some of you Splunkers. I'm new at this:

I'm trying to get the results of a top (n) inside_port for multiple inside_ip.

search string:
inside_ip=xxx.xxx.223.221 OR inside_ip=xxx.xxx.220.224 | top 5 inside_port

results returned:

inside_ip | inside_port | count | percent

223.221 | 22,80,443 | 6,3,1 | 60,30,10

220.224 | 443,3389,22 | 12,6,2 | 60,30,10

or alternative results:

inside_ip | inside_port | count | percent

223.221 | 22 | 6 | 60

223.221 | 80 | 3 | 30

0 Karma
1 Solution

Lucas_K
Motivator

would "top 5 inside_port by inside_ip" get you what your looking for?

View solution in original post

bmacias84
Champion

Could you post a _raw sanitized sample?

0 Karma

Lucas_K
Motivator

would "top 5 inside_port by inside_ip" get you what your looking for?

Lucas_K
Motivator

lol! Just check out docs.splunk, it's not 1/2 as bad as other product doco i've used in the past as it provides decent examples to better explain some of the concepts behind the actual commands.

http://docs.splunk.com/Documentation/Splunk/4.3.4/SearchReference/Top

0 Karma

Rhin0Crash
Path Finder

This worked perfectly! I don't know who you are, or where you came from, but I owe you a gift! This is going to work perfect, and probably kill the server hahaha!

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Splunk AI Assistant for SPL vs. ChatGPT: Which One is Better?

In the age of AI, every tool promises to make our lives easier. From summarizing content to writing code, ...

Data Persistence in the OpenTelemetry Collector

This blog post is part of an ongoing series on OpenTelemetry. What happens if the OpenTelemetry collector ...

Thanks for the Memories! Splunk University, .conf25, and our Community

Thank you to everyone in the Splunk Community who joined us for .conf25, which kicked off with our iconic ...