Splunk Enterprise

How to find the duration in minutes between two events from _time ?

mihir_hardas
Explorer

How to find the duration in minutes between two events from _time ?

 
index=log-13120-nonprod-c laas_appId=qbmp.prediction* "pushed to greenplum for predictionId"
2022-05-19 03:37:30,108 jobRunStats INFO Current Predictions, total=1659262 pushed to greenplum for predictionId = fe387967-2f11-4358-8b27-c51a45042e79
2022-05-19 03:26:29,085 jobRunStats INFO Current Predictions, total=1659262 pushed to greenplum for predictionId = 473866d5-c7b1-4156-90a0-de978b260e8d
 
I simply want diff between the above two and then show a line graph of cycle time length in minutes.
So then output will be 
11mins
14mins
7 mins 

And then I want to plot a line graph that will tell me length of my cycle time 
 
I do not want to use transation
Labels (1)
Tags (1)
0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust

 

| sort 0 _time
| streamstats window=2 range(_time) as timediff
| eval timediffmins=timediff/60

 

View solution in original post

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

 

| sort 0 _time
| streamstats window=2 range(_time) as timediff
| eval timediffmins=timediff/60

 

0 Karma

mihir_hardas
Explorer

Yes this works ! Many thanks 

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