Splunk Search

Lookup use without lookup definition

melonman
Motivator

Hi,

I am trying to create dynamic lookup file from search.
Before executing search to create lookupfile using outputlookup, I did not configure a stanza in transforms.conf because the csv is rarely used (only one time).

For testing, I did the following. and it was successful.
My questions is "Is it supported to use of lookup command with filename?"

ithout stanza in transforms.conf, I executed the following search to create csv file in lookup directry.

sourcetype="secure" | stats first(from) as ip by username | outputlookup ip_user.csv

Then, checked if the csv was created:

|inputlookup ip_user.csv

Result was successful.
Then, I used the csv file to do other search.

sourcetype="secure" | top limit=1 from | fields + from | lookup ip_user.csv ip as from

I could get the expected result.

Is this operation supported?

Because in the doc lookup command's syntax doesn't include the use of filename directly without stanza for lookup table name and filename association, I am wondering this is not right approach.

Could anyone tell me if this is OK?

Thank you, always!

Tags (1)
1 Solution

Ayn
Legend

I'm surprised to see it not documented - that functionality has been there...well, since always I would think 🙂

I've used it often, as have many others including Splunk employees, so while I can't give you an official word (I'm no Splunk employee) I can just confirm that it's not just you using this. That this would go away all of a sudden is pretty unlikely.

View solution in original post

Ayn
Legend

I'm surprised to see it not documented - that functionality has been there...well, since always I would think 🙂

I've used it often, as have many others including Splunk employees, so while I can't give you an official word (I'm no Splunk employee) I can just confirm that it's not just you using this. That this would go away all of a sudden is pretty unlikely.

melonman
Motivator

Thanks! Yea, I definitely want this to be in doc..

Get Updates on the Splunk Community!

What’s new on Splunk Lantern in August

This month’s Splunk Lantern update gives you the low-down on all of the articles we’ve published over the past ...

Welcome to the Future of Data Search & Exploration

You have more data coming at you than ever before. Over the next five years, the total amount of digital data ...

This Week's Community Digest - Splunk Community Happenings [8.3.22]

Get the latest news and updates from the Splunk Community here! News From Splunk Answers ✍️ Splunk Answers is ...