Splunk Search

How to Summarize (stats) Output.

albyva
Communicator

Right now I have a search which outputs the following:

| stats latest(bps_out) AS CurrentBPS BY Gateway,Hub,Interface,MaxSpeed

Gateway Hub Interface MaxSpeed CurrentBPS

router1.boston Boston so-0/0/0.0 10000000000 3843026418

router2.boston Boston so-0/0/1.0 10000000000 3813472541

What I'm trying to do is sum up this data by Hub so that it looks like:

Hub MaxSpeed CurrentBPS

Boston 20000000000 7656498959

The end result being a culmination of data per Hub. I tried using bucket and transaction, but just couldn't get it to work right. Maybe eval will work, but I wasn't skilled enough to get that working either. Any suggestions are greatly appreciated.

Thanks,

0 Karma
1 Solution

martin_mueller
SplunkTrust
SplunkTrust

Something like this?

<search> | stats latest(bps_out) AS CurrentBPS BY Gateway,Hub,Interface,MaxSpeed | stats sum(MaxSpeed) sum(CurrentBPS) by Hub

View solution in original post

martin_mueller
SplunkTrust
SplunkTrust

Something like this?

<search> | stats latest(bps_out) AS CurrentBPS BY Gateway,Hub,Interface,MaxSpeed | stats sum(MaxSpeed) sum(CurrentBPS) by Hub

albyva
Communicator

It's always the simple things that get you. 🙂
Thanks, that did it.

0 Karma
Get Updates on the Splunk Community!

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer at Splunk .conf24 ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

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