Splunk Search

How to add sum filed in table

jslee
Explorer

I have two fiels. Deny and Monitor.
I want to draw timechart added by SUM field.
Can i add SUM field?

_time A B _time A B SUM
0:0:0 1 2 => 0:0:0 1 2 3
0:0:1 3 3 0:0:1 3 3 6

Tags (1)
0 Karma

yannK
Splunk Employee
Splunk Employee

use the | addtotals command.
see http://docs.splunk.com/Documentation/Splunk/5.0.1/SearchReference/Addtotals

mysearch | table _time A B | addtotals

0 Karma

jslee
Explorer

It's very simple..thnx

0 Karma

yannK
Splunk Employee
Splunk Employee

or if you have fixed list of fields use an eval to do the sum
mysearch | eval SUM=A+B | table _time A B SUM

0 Karma
Get Updates on the Splunk Community!

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...