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!

Splunk Mobile: Your Brand-New Home Screen

Meet Your New Mobile Hub  Hello Splunk Community!  Staying connected to your data—no matter where you are—is ...

Introducing Value Insights (Beta): Understand the Business Impact your organization ...

Real progress on your strategic priorities starts with knowing the business outcomes your teams are delivering ...

Enterprise Security (ES) Essentials 8.3 is Now GA — Smarter Detections, Faster ...

As of today, Enterprise Security (ES) Essentials 8.3 is now generally available, helping SOC teams simplify ...