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!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...