Security

Field Extraction with transforms configuration

SplunkDash
Motivator

Hello,

I have issues getting expected field value pairs using following props and transforms configuration files. Sample events and my configuration files are given below. Any recommendation will be highly appreciated.

 

My Configuration Files

[mypropsfile]

REPORT-mytranforms=myTransfile

[myTransfile]
REGEX = ([^"]+?):\s+([^"]+?)
FORMAT = $1::$2

 

Sample Events

2023-11-15T18:56:30.098Z, User ID: 90A, User Type: TempEMP,  Product Code:  pc, UAT:  UTA-True, Event Type:  TEST,  EventID:  Lookup, Remote Host: 25.191.157.244

2023-11-15T18:56:29.098Z, User ID: 90A, Host:  vx2tbax.dev, User Type: TempEMP,  Product Code:  pc, UAT:  UTA-True, Event Type:  TEST,  EventID:  Lookup, Remote Host: 25.191.157.244

2023-11-15T18:56:28.098Z, User ID: 91B, User Type:  TempEMP,  Product Code:  pc, UAT:  UTA-True, Event Type:  TEST,  EventID:  Lookup, Remote Host: 25.191.157.244

2023-11-15T18:56:27.098Z, User ID: 91B, User Type:  TempEMP,  Product Code:  pc, UAT:  UTA-True, Event Type:  TEST,  EventID:  Lookup, Remote Host: 25.191.157.244

2023-11-15T18:56:27.001Z, User ID: 91B, User Type:  TempEMP,  Host:  vx2tbax.dev, Product Code:  pc, UAT:  UTA-True, Event Type:  TEST,  EventID:  Lookup, Remote Host: 25.191.157.244

 

Labels (1)
Tags (1)
0 Karma
1 Solution

dtburrows3
Builder

First glance it looks like this the regex you provided is looking for double quote to help find the pattern and the sample event don't seem to have any.

I think you may have better luck using a regex closer to


REGEX = \s+([^:]+?):\s+([^,]+)

I havent tested locally but on regex 101 it looks like it matches pretty well

dtburrows3_0-1702954514482.png

 

View solution in original post

dtburrows3
Builder

First glance it looks like this the regex you provided is looking for double quote to help find the pattern and the sample event don't seem to have any.

I think you may have better luck using a regex closer to


REGEX = \s+([^:]+?):\s+([^,]+)

I havent tested locally but on regex 101 it looks like it matches pretty well

dtburrows3_0-1702954514482.png

 

SplunkDash
Motivator

Hello @dtburrows3,

Thank you so much for your quick response, truly appreciate it. I am getting this:

 

SplunkDash_0-1702955013482.png

 

Tags (1)
0 Karma
Get Updates on the Splunk Community!

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...

Splunk APM: New Product Features + Community Office Hours Recap!

Howdy Splunk Community! Over the past few months, we’ve had a lot going on in the world of Splunk Application ...

Index This | Forward, I’m heavy; backward, I’m not. What am I?

April 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...