Knowledge Management

Custom Regex

vishwa
Path Finder

Below is the regex used, here we want to extract following fields:
DIM
TID
APPLICATION
POSITION
CORRLATIONID

The rex which i used is extraction DIM, TDI, APPLICATION as one field, but we need them separately.
We need to write the rex generic so that it should capture the data if there are different field names as well
vishwa_0-1712855367398.png

 

Labels (1)
Tags (1)
0 Karma

PickleRick
SplunkTrust
SplunkTrust

UGH. If you have any say in this - try to force the team responsible for producing these logs to get them in some reasonable format. It's some mix of pseudo-syslog embedded in some pseudo-json, and containing some "kinda delimited key/value pairs". It's not gonna end well.

0 Karma

scelikok
SplunkTrust
SplunkTrust

Hi @vishwa,

You can use below regex;

([A-Z]+)\:\s+(.+?)\s+

 

If this reply helps you an upvote and "Accept as Solution" is appreciated.
0 Karma

SierraX
Communicator

With this kind and quality of screenshot it's very hard to help.
Take a look to Fields in settings and there especially for Field extractions and Field transformations

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

You could try something like this

ITWhisperer_0-1712856948472.png

 

0 Karma

vishwa
Path Finder

Hi @ITWhisperer , 

Actually I need the generic rex like the way I posted in the screen shot because this is given in transforms.conf file and i tried the query u provided it's not working

0 Karma
Get Updates on the Splunk Community!

Enterprise Security Content Update (ESCU) | New Releases

In December, the Splunk Threat Research Team had 1 release of new security content via the Enterprise Security ...

Why am I not seeing the finding in Splunk Enterprise Security Analyst Queue?

(This is the first of a series of 2 blogs). Splunk Enterprise Security is a fantastic tool that offers robust ...

Index This | What are the 12 Days of Splunk-mas?

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