Splunk Search

Making multi value field in props/transforms from auto-extracted field

_smp_
Builder

I have events that whose fields like this:

Name=[name1,name2,name3]
Application=[app1,app2,app3]

Splunk is auto-extracting the fields into single values, like this:
Field:Value
Name:[name1,name2,name3]
Application:[app1,app2,app3]

Hoping to get some help configuring props/transforms to extract these (and a bunch of other) fields as multi-value fields at search time. My understanding is that the auto-extraction happens /after/ both inline and transform extraction, so I'm not sure how I would accomplish this. Do I need to KV_MODE=none and then do some kind of explicit extraction with each field?

0 Karma
1 Solution

somesoni2
Revered Legend

493669
Super Champion

Use this regex either in conf files or at search time:

<base_search>|rex mode=sed field=Value "s/\[(.*)]/\1/"|makemv Value delim=","|mvexpand Value
0 Karma

somesoni2
Revered Legend

Have a look at this method of extracting multivalued field from your data.

http://docs.splunk.com/Documentation/Splunk/7.0.2/Knowledge/ConfigureSplunktoparsemulti-valuefields

_smp_
Builder

Thank you somesoni2. I tried this before I posted, but it turns out I did not export the extraction to the search so it wasn't having any effect. I exported to system and the extractions worked properly in fields.conf:

[Name]
TOKENIZER = ([^\[,\]]+)

[Applications]
TOKENIZER = ([^\[,\]]+)

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Catalog Is Now Generally Available on Splunk Cloud Platform

A Unified View of Your Data  Security logs, application events, business data, and historical telemetry often ...

Developer Spotlight with Eduard Lekanne

From Network Engineer to Building Agentic AI for Splunk Eduard Lekanne has been architecting technology ...

From Data Landing to Insight

Search Across More of Your Data Ecosystem The data you need may live in Splunk, high-volume machine data, ...