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!

Get the T-shirt to Prove You Survived Splunk University Bootcamp

As if Splunk University, in Las Vegas, in-person, with three days of bootcamps and labs weren’t enough, now ...

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Wondering How to Build Resiliency in the Cloud?

IT leaders are choosing Splunk Cloud as an ideal cloud transformation platform to drive business resilience,  ...