Splunk Search

Field extraction optimisation

FunPolice
Path Finder

I want to extract the recipient and sender domains from e-mail addresses that appear in my logs. I can extract them from _raw:

EXTRACT-ToDomain = (?i)to=<[^@]*@(?<ToDomain>[^>]*)
EXTRACT-FromDomain = (?i)From=<[^@]*@(?<FromDomain>[^>]*)

or from existing fields:

EXTRACT-ToDomain = @(?P<ToDomain>[^>]*) in to
EXTRACT-FromDomain = @(?P<FromDomain>[^>]*) in From

Is one method more efficient than the other?

0 Karma
1 Solution

Ayn
Legend

Strictly speaking the second option would be a bit more efficient, but in reality I highly doubt you would be able to notice any difference.

View solution in original post

Ayn
Legend

Strictly speaking the second option would be a bit more efficient, but in reality I highly doubt you would be able to notice any difference.

Get Updates on the Splunk Community!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...