Splunk Search

How to find difference between events for a transaction?

marisstella
Explorer

Hello Everyone,
I want to find duration between the events in a transaction.
Let's say I have 100 events In a transaction, there is a failure at 49 th event and it is continued to 69th event so I want to calculate the difference between these two and find out how much time taken between these 20 events.
Can anyone of you help me on this?

0 Karma

to4kawa
Ultra Champion

for a transaction?
sorry, I don't use it.

your_search
| reverse
| streamstats count(searchmatch("failure"))) as session by your_transaction_id
| stats range(_time) as duration by your_transaciotn_id  session
| eval duration=tostring(duration,"duration")
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 ...