Splunk Search

Create a table from a multivalue field

maurelio79
Communicator

Hi to all, i need to create a table for a multivalue event. Event is like:

field1=value1, field2=value2, field3="valueA,valueB,valueC,"

i need to create a table like

value1, value2, valueA
value1, value2, valueB
value1, value2, valueC

So i need to exapand to multivalue e create a row in the table for each value of field3.
mvexpand seems what i need, but at the and the table is something like:

    value1, value2, valueA
                    valueB
                    valueC

Can someone please help me?

Thanks and regards

0 Karma
1 Solution

493669
Super Champion

try this:

...|makemv field3 delim=","|mvexpand field3

try this run anywhere search:

|makeresults|eval field1="value1", field2="value2", field3="valueA,valueB,valueC"|makemv field3 delim=","|mvexpand field3

View solution in original post

0 Karma

493669
Super Champion

try this:

...|makemv field3 delim=","|mvexpand field3

try this run anywhere search:

|makeresults|eval field1="value1", field2="value2", field3="valueA,valueB,valueC"|makemv field3 delim=","|mvexpand field3
0 Karma

maurelio79
Communicator

Nice!! Thanks you! I tried mvexpand or makemv, but not together.
Thanks!

0 Karma
Get Updates on the Splunk Community!

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...

Splunk APM: New Product Features + Community Office Hours Recap!

Howdy Splunk Community! Over the past few months, we’ve had a lot going on in the world of Splunk Application ...

Index This | Forward, I’m heavy; backward, I’m not. What am I?

April 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...