Splunk Search

rex and sed with automatic lookups

christoffertoft
Communicator

Hi,

This is basically a question of when automatic lookups are applied to data.

I have a field url i need to sed and then use an automatic lookup to assert whether the sed-ed url is in the list. What are the steps I need to take?
Is it easier to use the | lookup command after the sed pipe?

Ideally i have a search that runs the rex on url and then look for a lookup value that exists in the row for the value of that url in the lookup. If this is found, I know that the automatic lookup matched my rexed field.

0 Karma

woodcock
Esteemed Legend

You need this:
https://docs.splunk.com/Documentation/Splunk/latest/Knowledge/Searchtimeoperationssequence

So what you need to do is create Calculated Field using the replace() function (instead of | rex mode=sed to create the field that you need and then setup an Automatic Lookup and it will work just fine. If this is for the purpose of CIM-compliance, you must make it automatic (not in your search's SPL).

0 Karma

somesoni2
Revered Legend
0 Karma
Get Updates on the Splunk Community!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...