Splunk Search

Issue with extracting multifield values due to props.conf transform.conf settings

vikas_gopal
Builder

Hi Experts,

I am trying to extract something like below
type=type1,type3

My Data
event1.epochtime=1282182111 type=type1 value=value1 type=type3 value=value3

props.conf
[test]
REPORT-type = mv-type

transform.conf
[mv-type]
REGEX = type=(?type\s+)

MV_ADD = true

Now when I restart after above , I still see only one value in type, so result is type=type1 only . May I know what I am doing wrong ?

Regards
VG

0 Karma
1 Solution

kamlesh_vaghela
SplunkTrust
SplunkTrust

Hi

Can you please try below configuration?

props.conf

[test]
REPORT-type = mv-type

transform.conf

[mv-type]
REGEX = type=(?<type>[^\s+]*)
MV_ADD = true

Thanks

View solution in original post

0 Karma

kamlesh_vaghela
SplunkTrust
SplunkTrust

Hi

Can you please try below configuration?

props.conf

[test]
REPORT-type = mv-type

transform.conf

[mv-type]
REGEX = type=(?<type>[^\s+]*)
MV_ADD = true

Thanks

0 Karma

vikas_gopal
Builder

Well it works , I should have seen the comment which was mentioned at the below of the document . So it was the regex problem . Thanks for your response man

0 Karma

vikas_gopal
Builder

I am taking help from below doc and using same example from here
http://docs.splunk.com/Documentation/Splunk/6.0/Knowledge/Exampleconfigurationsusingfieldtransforms

0 Karma

somesoni2
Revered Legend

Use captital S in your REGEX instead of small case.

REGEX = type=(?<type>\S+)

See the comment from @Daljeanis at the bottom on the documentation.

0 Karma

vikas_gopal
Builder

Thanks mate I should have seen this before ..lolz it works

0 Karma
Get Updates on the Splunk Community!

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer at Splunk .conf24 ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

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

Combine Multiline Logs into a Single Event with SOCK: a Step-by-Step Guide for ...

Combine multiline logs into a single event with SOCK - a step-by-step guide for newbies Olga Malita The ...