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!

Cloud Platform & Enterprise: Classic Dashboard Export Feature Deprecation

As of Splunk Cloud Platform 9.3.2408 and Splunk Enterprise 9.4, classic dashboard export features are now ...

Explore the Latest Educational Offerings from Splunk (November Releases)

At Splunk Education, we are committed to providing a robust learning experience for all users, regardless of ...

New This Month in Splunk Observability Cloud - Metrics Usage Analytics, Enhanced K8s ...

The latest enhancements across the Splunk Observability portfolio deliver greater flexibility, better data and ...