Splunk Search

splunk timestamp calculation query

Csingh
Engager

Hi guys,

 

I am looking for a splunk query for following table 

 

JobNameJobtime
  
  
Job1   2021-05-01 22:19:23
  2021-05-01 22:19:22
  2021-05-01 19:54:38
  2021-05-01 19:52:37
  
  
  

 

 

Expected output:

 

 

JobNameJob timeTimecalculationTotaltime
Job1 2021-05-01 22:19:231( sec) from first two entries time difference=1+121=122 seconds
  2021-05-01 22:19:22  
  2021-05-01 19:54:38 2 minutes:1 second from entries 3 and 4 = 121 seconds 
  2021-05-01 19:52:37  

 

 

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Splunk works from events - what do your events look like? Are all the 4 timestamps in the same event? are the JobNames unique? Does the JobName appear in all events with the timestamps? Are there only ever 4 timestamps per JobName? Can there by fewer or more timestamps per JobName?

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Community Content Calendar, September edition

Welcome to another insightful post from our Community Content Calendar! We're thrilled to continue bringing ...

Splunkbase Unveils New App Listing Management Public Preview

Splunkbase Unveils New App Listing Management Public PreviewWe're thrilled to announce the public preview of ...

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...