Splunk Search

Using transforms.conf to create a new field

mw
Splunk Employee
Splunk Employee

I have events which include:

.... relevant=False ....

and I'd like to transform those at search time into a field that doesn't yet exist:

.... compliant=True ....

I thought that this transforms entry, along with the associated props REPORT would do it, but I'm missing something:

# Flip the relevant result to a compliant field
[rtc_comp]
SOURCE_KEY = relevant
DEST_KEY = compliant
REGEX = False
FORMAT = True

Thanks in advance!

0 Karma
1 Solution

Stephen_Sorkin
Splunk Employee
Splunk Employee

The problem here is probably that regex-based field extractions take place before automatic field=value extractions. Your best bet here isn't to use field extractions to map relevant to compliant, but rather to use a csv lookup table to create the new field. It will be higher performance especially if you want to refer to "compliant" in the search itself.

A good introduction is at: http://blogs.splunk.com/2009/07/27/enriching-data-with-lookups-part-1/ or http://www.splunk.com/base/Documentation/latest/Knowledge/Addfieldsfromexternaldatasources

View solution in original post

Stephen_Sorkin
Splunk Employee
Splunk Employee

The problem here is probably that regex-based field extractions take place before automatic field=value extractions. Your best bet here isn't to use field extractions to map relevant to compliant, but rather to use a csv lookup table to create the new field. It will be higher performance especially if you want to refer to "compliant" in the search itself.

A good introduction is at: http://blogs.splunk.com/2009/07/27/enriching-data-with-lookups-part-1/ or http://www.splunk.com/base/Documentation/latest/Knowledge/Addfieldsfromexternaldatasources

mw
Splunk Employee
Splunk Employee

Thank you, sir! That was my next destination. Incidentally, is there data regarding the performance of various actions, or some sort of performance priority chart?

0 Karma
Get Updates on the Splunk Community!

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

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 ...