Splunk Search

Extracting multiple values from one field

slandail
New Member

Using the Akamai app, and the configuration 'akamai-access-combined-extractions' uses:

[[all:other]]

... to capture a field that contains two pipe-separated values, where the pipe character indicates the end of each string:

"1_2141|959006|"

Trying to modify the config to split the field into two, but my regex kung fu is pretty weak. I tried this:

(?:[$|]+[[all:waf_version]]++[[all:waf_rule]]++)

... but I ran into a 'Regex: range out of order in character class' error.

Thoughts on how to fix?

Tags (2)
0 Karma

MHibbin
Influencer

Is it possible to perform search-time field extraction using RegEx? I know this not what you are asking but possibly another solution...

If so you could use something like:

*|rex field=test "(?<test1>\d+\_\d+)\|(?<test2>\d+)\|"

This will works assuming the strings are built-up of ...

 {(one or more digit)(underscore)(one or more digit)} (pipe) {(one or more digit)}

So this works on the following types of data:

1_211|959006|
1_2141|959006|
1_21|959006|
1_2141|9590|
1_2141|959006|
0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Introduction to Splunk AI

How are you using AI in Splunk? Whether you see AI as a threat or opportunity, AI is here to stay. Lucky for ...

Splunk + ThousandEyes: Correlate frontend, app, and network data to troubleshoot ...

Are you tired of troubleshooting delays caused by siloed frontend, application, and network data? We've got a ...

Maximizing the Value of Splunk ES 8.x

Splunk Enterprise Security (ES) continues to be a leader in the Gartner Magic Quadrant, reflecting its pivotal ...