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!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...