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!

Introducing the 2024 SplunkTrust!

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

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...