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!

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