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!

Splunk AI Assistant for SPL | Key Use Cases to Unlock the Power of SPL

Splunk AI Assistant for SPL | Key Use Cases to Unlock the Power of SPL  The Splunk AI Assistant for SPL ...

Buttercup Games: Further Dashboarding Techniques (Part 5)

This series of blogs assumes you have already completed the Splunk Enterprise Search Tutorial as it uses the ...

Customers Increasingly Choose Splunk for Observability

For the second year in a row, Splunk was recognized as a Leader in the 2024 Gartner® Magic Quadrant™ for ...