Splunk Search

How to add or sum values in a timechart?

sridharreddy
New Member

Hi Splunkers,

How to add or SUM values in timechart as shown below:

Search I used:

base search|transaction....|timechart sum(duration) as duration by stage

Below is my current output:

_time                  stage1    stage2    stage3         
2016-08-09 09:40:00      10                      
2016-08-09 09:43:00                4         1
2016-08-09 09:44:00      5         2
2016-08-09 09:48:00   

Expected output:

_time                  stage1    stage2    stage3         
2016-08-09 09:40:00      15                      
2016-08-09 09:43:00                4         3
2016-08-09 09:44:00                                       
2016-08-09 09:48:00    

Thanks

0 Karma

sundareshr
Legend

Try this

base search|transaction.... | eventstats latest(_time) as time by stage |chart sum(duration) as duration over time by stage
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 ...