Getting Data In

How can point transforms REGEX parameter in transforms.conf?

rakesh_498115
Motivator

Hi..

I have a created a regex called "ClientDetails" in props.conf and i need two more fields from this extracted field "ClientDetails" , and these fields need to be have MV_ADD feature.

So now how can i define them in transforms.conf

props.conf

EXTRACT-ClientDetails = [A-Z]{1}\s[A-Z]{1}\s([A-Z]{2})\s?(?<ClientDetails>[^\s\']*)[\s\']
REPORT-userinfo = userinfo

transforms.conf

[userinfo]
REGEX = \,?(?<UserName>[^(]*)\((?<SectionName>[^)]*)\) in ClientDetails
MV_ADD=true

but this seems to be not workin . can u pls where i am going wrong.

Tags (1)
0 Karma

kristian_kolb
Ultra Champion

REGEX does not work with the in sourcefield option (like EXTRACT does). Thus, the 'in ClientDetails' part of your regex is seen as a literal string to be matched. So you probably need to rewrite the regular expression so that it will work for the whole event (_raw).

Hope this helps,

K

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 ...