Reporting

Implementing conditions between different lines in stats command

jarrebola
Explorer

I have extracted this data with the stats command.

jarrebola_1-1716884361179.png

The goal is to compare left timestamp (start time) of the second line with right timestamp of previous line (end time) and the condition will be like this

if (start next row > end previous row) 1:0; in this way I want to mark this lines with bool=1 if not bool=0

Please someone has some suggestion about how can I implement this?

Thanks in advance

 

 

Tags (2)
0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust
| streamstats window=1 current=f values(right_time) as previous_right_time

View solution in original post

jarrebola
Explorer

I already figured out ..

Thanks for your help ITWhisperer.

jarrebola_0-1716886398846.png

 

0 Karma

jarrebola
Explorer

Hi ITWhisperer, first I want to say Thanks !, now I have this with your suggestion, 

jarrebola_0-1716885750469.png

Now I need to compare the start time with previous right_time to set the bool field for every line, how I can do this please?

Thanks you !

 

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust
| streamstats window=1 current=f values(right_time) as previous_right_time
Get Updates on the Splunk Community!

Data Management Digest – December 2025

Welcome to the December edition of Data Management Digest! As we continue our journey of data innovation, the ...

Index This | What is broken 80% of the time by February?

December 2025 Edition   Hayyy Splunk Education Enthusiasts and the Eternally Curious!    We’re back with this ...

Unlock Faster Time-to-Value on Edge and Ingest Processor with New SPL2 Pipeline ...

Hello Splunk Community,   We're thrilled to share an exciting update that will help you manage your data more ...