Splunk Search

How to concatenate Dynamic multivalue fields to single value fields?

wealot
Engager

Hi all,

I have events coming in that have multivalue fields, but not always the same fields are multivalue. I want all the fields in the events resulting from a search to be concatenated to single value field.

Example:

Result now shows:

dest       xyz

                fff

Result should show:

dest   xyz [delimiter] fff

Just to be sure that everyone understand using dest here is an example it should be a query that I can run that would actually change every multivalue field regardless of field name.

Cheers,

Labels (1)
Tags (2)
0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust
| foreach *
    [| eval <<FIELD>>=mvjoin(<<FIELD>>,",")]

View solution in original post

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust
| foreach *
    [| eval <<FIELD>>=mvjoin(<<FIELD>>,",")]
0 Karma

wealot
Engager

Mind blown! I did not know that foreach existed in Splunk, thanks!

0 Karma
Get Updates on the Splunk Community!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

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

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