Splunk Search

show send and receive from internet to my ftp server

khanlarloo
Explorer

i want to show the how much user send and receive from the internet to my ftp server,is my search command right?
index="fw" policyid=143 |eval send=round((bytes_out)/131072,2) |eval receive=round((bytes_in)/131072,2) |search send > 0 |timechart span=1m count by send receive
it shows the count of the send but i don't want to show send based on count

Tags (1)
0 Karma

woodcock
Esteemed Legend

Try this:

index="fw" policyid=143
| timechart span=1m sum(bytes_out) AS sent sum(bytes_in) AS received BY user
| foreach sent* received* [ eval <<FIELD>> = round('<<FIELD>>'/131072, 2) ]
|eval send=round((bytes_out)/131072,2) |eval receive=round((bytes_in)/131072,2)
0 Karma

DMohn
Motivator

You are using the count command here, hence it is showing you counts. If you want to have the sum of the transferred data, use sum instead...

index="fw" policyid=143 |eval send=round((bytes_out)/131072,2) |eval receive=round((bytes_in)/131072,2) |search send > 0 |timechart span=1m sum(send) as sent, sum(receive) as received
0 Karma

khanlarloo
Explorer

it doesn't show the correct bandwidth

0 Karma

DMohn
Motivator

Can you post some example log lines, this would make it easier to help...

0 Karma
Get Updates on the Splunk Community!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

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