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!

Building Reliable Asset and Identity Frameworks in Splunk ES

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

Cloud Monitoring Console - Unlocking Greater Visibility in SVC Usage Reporting

For Splunk Cloud customers, understanding and optimizing Splunk Virtual Compute (SVC) usage and resource ...

Automatic Discovery Part 3: Practical Use Cases

If you’ve enabled Automatic Discovery in your install of the Splunk Distribution of the OpenTelemetry ...