Splunk Search

How to assign the 2 start_time and stop_time of one event into _time field ?

Jouman
Path Finder

Hi all,

I have an table with the start time and stop time in each case as below.

IDCase NameStart TimeStop Time
user_1Case_A2023.08.10 13:26:37.8677872023.08.10 13:29:42.159543
user_2Case_B2023.08.10 13:29:42.1595452023.08.10 13:29:48.202143

 

Because I want to merge the duration of case execution with another event, I hope to transfer the above table into this kind of table.

_timeIDCase Namecase_action
2023.08.10 13:26:37.867787user_1Case_Astart
2023.08.10 13:29:42.159543user_1Case_Astop
2023.08.10 13:29:42.159545user_2Case_Bstart
2023.08.10 13:29:48.202143user_2Case_Bstop

 

I could transfer the start time into _time by 

 

|eval _time='Start Time'

 

However, I can't think of a solution to record "Stop Time" into _time as well.

Does any one have a idea about how to accomplish this?

 

Thanks a lot.

Labels (1)
0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust
| eval time=mvappend('Start Time', 'Stop Time')
| mvexpand time
| eval _time=time

View solution in original post

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust
| eval time=mvappend('Start Time', 'Stop Time')
| mvexpand time
| eval _time=time
0 Karma
Get Updates on the Splunk Community!

Index This | Why did the turkey cross the road?

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

Enter the Agentic Era with Splunk AI Assistant for SPL 1.4

  🚀 Your data just got a serious AI upgrade — are you ready? Say hello to the Agentic Era with the ...

Feel the Splunk Love: Real Stories from Real Customers

Hello Splunk Community,    What’s the best part of hearing how our customers use Splunk? Easy: the positive ...