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!

Stay Connected: Your Guide to July and August Tech Talks, Office Hours, and Webinars!

Dive into our sizzling summer lineup for July and August Community Office Hours and Tech Talks. Scroll down to ...

Edge Processor Scaling, Energy & Manufacturing Use Cases, and More New Articles on ...

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Get More Out of Your Security Practice With a SIEM

Get More Out of Your Security Practice With a SIEMWednesday, July 31, 2024  |  11AM PT / 2PM ETREGISTER ...