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!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

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 ...