Splunk Search

How to edit my stats search to get a sum of bytes per app and total sum for all traffic?

ethanrulez80
New Member

I currently get events that shows bytes received from a router. What I'm trying to do is use stats to obtained a sum of all traffic, then categorize traffic by apps.

Example:

Table:

| Sum of Bytes        | 999
| Sum of Http Bytes   |  89
| Sum of VoIP Bytes   | 910

What my search looks like:

index=* | stats sum(Bytes) ,sum(Bytes) where [interface]="A" , sum(Bytes) where [interface]="B"
0 Karma
1 Solution

somesoni2
Revered Legend

Try like this

your base search | stats sum(Bytes) as Bytes by interface | addcoltotals labelfield=interface label="All Interfaces"

View solution in original post

0 Karma

somesoni2
Revered Legend

Try like this

your base search | stats sum(Bytes) as Bytes by interface | addcoltotals labelfield=interface label="All Interfaces"
0 Karma
Get Updates on the Splunk Community!

[Puzzles] Solve, Learn, Repeat: Dynamic formatting from XML events

This challenge was first posted on Slack #puzzles channelFor a previous puzzle, I needed a set of fixed-length ...

Enter the Agentic Era with Splunk AI Assistant for SPL 1.4

  🚀 Your data just got a serious AI upgrade — are you ready? Say hello to the Agentic Era with the ...

Stronger Security with Federated Search for S3, GCP SQL & Australian Threat ...

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...