Splunk Search

Multi Value Field with Auto Extracted Field

msettipane
Splunk Employee
Splunk Employee

Can Splunk be configured to create a multi value field with auto extracted "name=value" fields.

11/2/11 08:03:00 field-one=who, field-one=what, field-one=where, field-one=why, field-one=when

field_one = who,what,where,why,when

sdwilkerson
Contributor

Matty,

I just stumbled onto this and had the same issue last week. I saw a solution posted by Nick here: http://splunk-base.splunk.com/answers/10708/how-do-i-combine-mv-fields-into-a-new-field?page=1&focus...

I took that solution and wrapped it into a macro so I could call it at will from the CLI like this:

eventtype=data | `combine_two_fields(field1,field2,final_field)`

This worked splendidly and is definitely "a keeper."

0 Karma

Ayn
Legend

Without having tested it myself, perhaps mvcombine can do the trick?

0 Karma

msettipane
Splunk Employee
Splunk Employee

Nope. Tried all of the mvs. Everything will work if you use a rex with max_match; however, cannot get it working with auto extracted fields.

0 Karma
Get Updates on the Splunk Community!

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer at Splunk .conf24 ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...

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 ...