Splunk Search

use inputlookup output as fulltext search in outer search

wegscd
Contributor

I have a lookup table of userids that I want to use as the search terms for a fulltext search. Basically, the outer search should match if the events contain any of the userids in the lookup table.

I can make things work if I extract the proper userid field from the outer search, but I'm not positive I can write a reliable regex to extract the userid from sourcetype=ItimUsage (too much cruft in there), so I want to use a full text search to hedge my bets (false positives are cheap, missed positives are expensive).

I saw http://answers.splunk.com/answers/268992/use-subsearch-result-as-fulltext-search-in-outer-s.html, but it does not seem to work for me:

index=w_itimlogs sourcetype=ItimUsage [ | inputlookup executives | eval _raw="*" . userid . "*" | fields + _raw ]

Any thoughts as to why the outer search is not matching?

0 Karma

woodcock
Esteemed Legend

OK, this is funky but it works:

 index=w_itimlogs sourcetype=ItimUsage | eval raw=_raw | search [| inputlookup executives | eval raw="*" . userid . "*" | fields raw]

I also answered it in the other question.

woodcock
Esteemed Legend

Did you get this to work?

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Tech Talk Recap | Mastering Threat Hunting

Mastering Threat HuntingDive into the world of threat hunting, exploring the key differences between ...

Observability for AI Applications: Troubleshooting Latency

If you’re working with proprietary company data, you’re probably going to have a locally hosted LLM or many ...

Splunk AI Assistant for SPL vs. ChatGPT: Which One is Better?

In the age of AI, every tool promises to make our lives easier. From summarizing content to writing code, ...