Splunk Search

How to get the difference of time between 2 events

gajananh999
Contributor

Hello Everyone,

I have events like

02-Jul-2014 09:25:25 AM: ========== Finish Transmit Process ==========

02-Jul-2014 09:25:25 AM: AA Proc for AttachmentTransmission

02-Jul-2014 09:25:25 AM: AA Software (Axway Synchrony) version is not setup in ESM Schema in table EDI_TYPE_CD. Default version of EDI Software is 4.2

02-Jul-2014 09:25:25 AM: AA Service Login to 'AA' Database with UserID 'AA' Successfully

02-Jul-2014 09:25:23 AM: ========== Start Transmit Process ==========

So i want to find out the Time which is take by process to complete its task. So here it will be 02.02 sec

Thanks

Gajanan Hiroji

0 Karma
1 Solution

Ayn
Legend

Create a transaction that starts with the "Start Transmit Process" line and ends with the "Finish Trnamit Process" line. The transaction command will automatically create a field duration which gives you the duration of the transaction, which is the same as the time difference between the start and end event.

... | transaction startswith="========== Start Transmit Process ==========" endswith="========== Finish Transmit Process =========="

View solution in original post

Ayn
Legend

Create a transaction that starts with the "Start Transmit Process" line and ends with the "Finish Trnamit Process" line. The transaction command will automatically create a field duration which gives you the duration of the transaction, which is the same as the time difference between the start and end event.

... | transaction startswith="========== Start Transmit Process ==========" endswith="========== Finish Transmit Process =========="

gajananh999
Contributor

Thanks Ayn.

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