Getting Data In

Can you help me with search time field extraction using props.conf & transforms.conf?

conan311
New Member

Hi splunk gurus,

I am new to Splunk and having some difficulty with a search time field extraction.

This is a sample log I would like to parse. (FIX log)

20181009-14:55:41.450 : 8=FIX.4.29=6435=034=295849=BLAH4252=20181009-14:55:41.44556=BLAH4210=115

Inputs.conf

[default]
host = ..servername..
index = ..blah.. 

[monitor://D:\test\FIX\fix2.log]
sourcetype = test-fix-logs2

transforms.conf

[test1]
REGEX = 8=(?P<tag_8>[^,]*?)\cA
FORMAT = tag_8::$1

[test2]
REGEX = \cA9=(?P<tag_9>[^,]*?)\cA
FORMAT = tag_9::$1

props.conf

[test-fix-logs2]
REPORT-class1 = test1
REPORT-class2 = test2

I have spent a few hours, but I couldn't find what could be potentially wrong as I don't see those two fields ('tag_8' & 'tag_9') in the search result in Splunk Web.

Can anyone please advise?

0 Karma

harsmarvania57
Ultra Champion

Hi @conan311,

You can achieve this extraction on search head with 2 different methods.

  • Only with props.conf

You can do below configuration only in props.conf and both fields will be extracted based on your regex.

[test-fix-logs2]
EXTRACT-testing = 8=(?P<tag_8>[^,]*?)\cA9=(?P<tag_9>[^,]*?)\cA
  • Combination of props.conf and transforms.conf

props.conf

[test-fix-logs2]
REPORT-testing = test1,test2

transforms.conf

[test1]
CLEAN_KEYS = 0
REGEX = 8=(?P<tag_8>[^,]*?)\cA

[test2]
CLEAN_KEYS = 0
REGEX = \cA9=(?P<tag_9>[^,]*?)\cA
0 Karma

conan311
New Member

@harsmarvania57 , thanks for your answer. It doesn't look like my sourcetype defined in inputs.confg ("test-fix-logs2") gets acknowledged. Can you see what could be wrong?

0 Karma

harsmarvania57
Ultra Champion

Can you please clarify "acknowledged", are you able to see test-fix-logs2 sourcetype in splunk while running the splunk query ?

Additionally above props.conf and transforms.conf should be on Indexer or Heavy Forwarder whichever comes first from Universal Forwarder and then you need to restart splunk to take effect of those new configurations.

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...