Splunk Search

Why when I use mvzip , mvexpand, mvindex(split, the first 4 fields keep repeating?

karu0711
Communicator

 

index="main" sourcetype="vrea"
| eval nested_payload=mvzip(info, solution, "---")
| mvexpand nested_payload
| eval info=mvindex(split(nested_payload, "---"), 1)
| eval solution=mvindex(split(nested_payload, "---"), 0)
| eval nested_payload=mvzip(line, more, "---")
| mvexpand nested_payload
| eval line=mvindex(split(nested_payload, "---"), 1)
| eval more=mvindex(split(nested_payload, "---"), 0)
| eval nested_payload=mvzip(ID, Severity, "---")
| mvexpand nested_payload
| eval Severity=mvindex(split(nested_payload, "---"), 1)
| eval CWE_ID=mvindex(split(nested_payload, "---"), 0)
| table info solution ID Severity line more

 

 

when use the SPL my table fields value first 4 fields keep repeating same value but last 2 field "line and more" correct value? 

anyone know why it is happening?

Labels (1)
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

It sounds like mvexpand is doing exactly what it is supposed to do, that is, create duplicate events except for the field being expanded, which will contain each of the values in the multi-value field in separate events.

0 Karma

yuanliu
SplunkTrust
SplunkTrust

Please explain the question with sample data and sample output, then explain why you feel the output is wrong.  Otherwise it's just a waste of time for others to try to speculate what the question really is.

0 Karma
Get Updates on the Splunk Community!

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

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

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

Splunk Lantern is Splunk’s customer success center that provides advice from Splunk experts on valuable data ...

Combine Multiline Logs into a Single Event with SOCK: a Step-by-Step Guide for ...

Combine multiline logs into a single event with SOCK - a step-by-step guide for newbies Olga Malita The ...