Splunk Search

Splunk_TA_windows, multiple src extractions

astatrial
Contributor

Hi all,

I have the Splunk_TA_windows and i noticed that there are multiple transforms-extract for field named src. 

For example:

- Client_Address_as_src

- Source_Network_Address_as_src

I am wondering what value the filed "src" will have if there are values for two or more of the source fields.

I need this because the Authentication DM has this field, and i want to know what the values that it uses. 

Thanks

0 Karma
1 Solution

Richfez
SplunkTrust
SplunkTrust

You have to look at the names of the transforms and how they're laid out.  But it's a simple set of rules.

Consider

REPORT-aaa = extract_src2, extract_src1
REPORT-bbb = extract_src3

If those all apply to the same events, then...

REPORT-aaa applies two transforms, in the order they're written.  extract_src2 will happen before extract_src1.  If they both extract a field called 'src', then the last one extracted is the final value after that's been run.

THEN REPORT-bbb gets run.  Again, if it extracts a field called src (and actually extracts it because it matches, etc...) then it extracts src, overwriting whatever is there.

So, last to run overwrites all that came before it, assuming it actually extracts.

(That last is actually important.  You can try to extract field1 from a certain regex.  Then you can try to re-extract it from a different regex. If the second regex doesn't match the event, then it's not re-extracted, and it won't overwrite.  This is one of the ways to pile up a whole lot of different ways to extract a certain field.)

 

This is dense, but has all the answers:
https://docs.splunk.com/Documentation/Splunk/8.0.5/Knowledge/Searchtimeoperationssequence

And while ultimately it's linked from in that page above, here's the detailed look at the lexicographical ordering:
https://docs.splunk.com/Documentation/Splunk/8.0.5/Knowledge/Searchtimeoperationssequence#Lexicograp...

 

View solution in original post

Richfez
SplunkTrust
SplunkTrust

You have to look at the names of the transforms and how they're laid out.  But it's a simple set of rules.

Consider

REPORT-aaa = extract_src2, extract_src1
REPORT-bbb = extract_src3

If those all apply to the same events, then...

REPORT-aaa applies two transforms, in the order they're written.  extract_src2 will happen before extract_src1.  If they both extract a field called 'src', then the last one extracted is the final value after that's been run.

THEN REPORT-bbb gets run.  Again, if it extracts a field called src (and actually extracts it because it matches, etc...) then it extracts src, overwriting whatever is there.

So, last to run overwrites all that came before it, assuming it actually extracts.

(That last is actually important.  You can try to extract field1 from a certain regex.  Then you can try to re-extract it from a different regex. If the second regex doesn't match the event, then it's not re-extracted, and it won't overwrite.  This is one of the ways to pile up a whole lot of different ways to extract a certain field.)

 

This is dense, but has all the answers:
https://docs.splunk.com/Documentation/Splunk/8.0.5/Knowledge/Searchtimeoperationssequence

And while ultimately it's linked from in that page above, here's the detailed look at the lexicographical ordering:
https://docs.splunk.com/Documentation/Splunk/8.0.5/Knowledge/Searchtimeoperationssequence#Lexicograp...

 

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!

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

Unlock What’s Next: The Splunk Cloud Platform at .conf25

In just a few days, Boston will be buzzing as the Splunk team and thousands of community members come together ...