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!

What the End of Support for Splunk Add-on Builder Means for You

Hello Splunk Community! We want to share an important update regarding the future of the Splunk Add-on Builder ...

Solve, Learn, Repeat: New Puzzle Channel Now Live

Welcome to the Splunk Puzzle PlaygroundIf you are anything like me, you love to solve problems, and what ...

Building Reliable Asset and Identity Frameworks in Splunk ES

 Accurate asset and identity resolution is the backbone of security operations. Without it, alerts are ...