Splunk Search

How do I use MV_ADD to split raw strings with pipe separated values into multivalue fields?

gesman
Communicator

I have data like this:

one_field="value_a|value_b|value_c", other_field="value_x|value_y"

How can I instruct MV_ADD to convert fields within such data to multivalue fields including auto-splitting value at '|'?

Tags (3)
0 Karma

gesman
Communicator

Apparently I don't even need MV_ADD, this solution seems to work:

Adding this to ./etc/system/local/fields.conf:

[one_field]
TOKENIZER = ([^\|]+)

[other_field]
TOKENIZER = ([^\|]+)

Ideally though I'd love to limit such transformation to specific sourcetype or index, instead of doing it globally. Not sure it's possible with fields.conf-based solution.

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