Splunk Search

Group same source ip ?

chengyu
Path Finder

Hi sir:

sourcetype=xxx |eval bandwidth=rcvdbyte+sentbyte |eval bandwidth(MB) = round(bandwidth/1024/1024,2) |table srcip,dstip,...,bandwidth(MB)|sort bandwidth(MB) desc

now:
srcip dstip ..... bandwidth(MB)
1.1.1.1 2.2.2.2 .... 100
1.1.1.1 2.2.2.2 .... 200
1.1.1.2 2.2.2.2 .... 200

I hope :

srcip dstip ..... bandwidth(MB)
1.1.1.1 2.2.2.2 .... 300
1.1.1.2 2.2.2.2 .... 200

what can i do?

Tags (2)
0 Karma
1 Solution

chengyu
Path Finder

I'm try it, is working fine.

sourcetype=xxx srcip | eval bandwidth=rcvdbyte+sentbyte | eval bandwidth(MB) = round(bandwidth/1024/1024,2) | stats list(dstip) as dstip , values(hostname) as hostname ,values(app) as app,sum(bandwidth(MB)) as bandwidth(MB) by srcip | sort bandwidth(MB) desc

View solution in original post

0 Karma

chengyu
Path Finder

I'm try it, is working fine.

sourcetype=xxx srcip | eval bandwidth=rcvdbyte+sentbyte | eval bandwidth(MB) = round(bandwidth/1024/1024,2) | stats list(dstip) as dstip , values(hostname) as hostname ,values(app) as app,sum(bandwidth(MB)) as bandwidth(MB) by srcip | sort bandwidth(MB) desc

0 Karma

chengyu
Path Finder

Thank you~

0 Karma

somesoni2
Revered Legend

Try this

sourcetype=xxx |eval bandwidth=rcvdbyte+sentbyte |eval bandwidth(MB) = round(bandwidth/1024/1024,2) |stats sum(bandwidth(MB)) as bandwidth(MB) by srcip,dstip,...| sort bandwidth(MB) desc

MuS
Legend

Hi chengyu,

try this:

sourcetype=xxx | eval bandwidth=rcvdbyte+sentbyte | eval bandwidth(MB) = round(bandwidth/1024/1024,2) | stats values(bandwidth(MB)) AS bandwidth by srcip,dstip,...,bandwidth(MB) | sort bandwidth desc

cheers, MuS

Get Updates on the Splunk Community!

Introducing Splunk Enterprise 9.2

WATCH HERE! Watch this Tech Talk to learn about the latest features and enhancements shipped in the new Splunk ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...