Deployment Architecture

How do I split multiple events into seperate columns, and form one single row?

CodyQuinney
New Member

Hi,

I'm wanting to split multiple event types into separate columns, and form one single row for a Linux system. Currently, my output looks similar to:
_time acct Type Result
12:49 smith User_Start Success
13:05 smith User_End Success

I would like to have it look more like this (if possible):
_time acct Type _time Type Result
12:49 smith User_Start 13:05 User_End Success

0 Karma

kamlesh_vaghela
SplunkTrust
SplunkTrust

Hi

Can you please try this?

YOUR SEARCH  | stats delim="," list(Type) as Type list(_time) as Time list(Result) as Result by acct | mvcombine Time | mvcombine Type | mvcombine Result | eval Type1=mvindex(split(Type,","),0),Type2=mvindex(split(Type,","),1),Start_Time=strftime(mvindex(split(Time,","),0),"%Y-%m-%d %H:%M:%S"),End_Time=strftime(mvindex(split(Time,","),1),"%Y-%m-%d %H:%M:%S") ,Result1=mvindex(split(Result,","),0),Result2=mvindex(split(Result,","),1)  | table acct Type1 Start_Time Result1 Type2 End_Time Result2

Thanks

0 Karma
Get Updates on the Splunk Community!

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

Splunk Lantern is Splunk’s customer success center that provides advice from Splunk experts on valuable data ...

Combine Multiline Logs into a Single Event with SOCK: a Step-by-Step Guide for ...

Combine multiline logs into a single event with SOCK - a step-by-step guide for newbies Olga Malita The ...

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...