Splunk Enterprise

MUltivalue fields

bhavneeshvohra
Engager

i have a field as abc=1\,2\,3\,4\,5\,

i need to reemove the backslashes and  have a multivalue field like abc=1,2,3,4,5

How to do this please help.

Labels (1)
Tags (1)
0 Karma

manjunathmeti
Champion

hi @bhavneeshvohra,

Use replace function with eval command OR rex command with sed.

 

| eval abc=replace(abc, "\\\\", "")

 

OR

 

| rex field=abc mode=sed "s/\\\//g"

 

Then if you want to make field abc a multivalued field using makemv:

| eval abc=replace(abc, "\\\\", "") | makemv delim="," abc

Field abc is further expanded using mvexpand,

| eval abc=replace(abc, "\\\\", "") | makemv delim="," abc | mvexpand abc

 

If this reply helps you, an upvote/like would be appreciated.

0 Karma
Get Updates on the Splunk Community!

What the End of Support for Splunk Add-on Builder Means for You

Hello Splunk Community! We want to share an important update regarding the future of the Splunk Add-on Builder ...

Solve, Learn, Repeat: New Puzzle Channel Now Live

Welcome to the Splunk Puzzle PlaygroundIf you are anything like me, you love to solve problems, and what ...

Building Reliable Asset and Identity Frameworks in Splunk ES

 Accurate asset and identity resolution is the backbone of security operations. Without it, alerts are ...