Splunk Search

Nested Transaction Time

vanaepi
Explorer

Due to various cross references, I am forced to use nested transactions. In other words, I group several events into a transaction, and then I group several of those transactions in yet another transaction. And it works the way I want it to, except...

The time of a transaction is the same as the time of the first event. So the duration of the last transaction is calculated as the difference between the starttime of the first transaction and the starttime of the last transaction.

In stead, I need the difference between the starttime of the first transaction and the endtime of the last transaction.

How would I go about doing this?

Tags (2)
1 Solution

kristian_kolb
Ultra Champion

Don't have a splunk in front of me right now, but I'm guessing something like this might work (adding the duration of the last sub-transaction to the duration of the 'parent')

... | transaction X | eventstats latest(duration) as latest_dur by X | transaction Y | eval dur = duration+latest_dur 

Hope this helps,

K

View solution in original post

kristian_kolb
Ultra Champion

Don't have a splunk in front of me right now, but I'm guessing something like this might work (adding the duration of the last sub-transaction to the duration of the 'parent')

... | transaction X | eventstats latest(duration) as latest_dur by X | transaction Y | eval dur = duration+latest_dur 

Hope this helps,

K

vanaepi
Explorer

Yep it did the trick. Thanks!

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