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!

New Year, New Changes for Splunk Certifications

As we embrace a new year, we’re making a small but important update to the Splunk Certification ...

[Puzzles] Solve, Learn, Repeat: Unmerging HTML Tables

[Puzzles] Solve, Learn, Repeat: Unmerging HTML TablesFor a previous puzzle, I needed some sample data, and ...

Enterprise Security (ES) Essentials 8.3 is Now GA — Smarter Detections, Faster ...

As of today, Enterprise Security (ES) Essentials 8.3 is now generally available, helping SOC teams simplify ...