Splunk Search

How do I resolve "Error in 'lookup' command" after configuring a lookup definition in transforms.conf?

diavolo
Path Finder

I configured external lookup definition with a script I built. However, the lookup command fails with the following message.

Error in 'lookup' command: The lookup table 'mylookup' does not exist or is not available.

SPL Command:
... | lookup mylookup myfield

$SPLUNK_HOME/etc/apps/myapp/local/transforms.conf:

[mylookup]
external_cmd = get_lookup.py
fields_list =Title,Genre,Country,imdbRating

I placed get_lookup.py in $SPLUNK_HOME/etc/apps/myapp/bin/.
What's wrong with the lookup definition?

(Splunk Ver: 6.5 / OS: Mac OS X)

0 Karma
1 Solution

kikeyama
Splunk Employee
Splunk Employee

What is the permission of lookup definition (Private, App only, or Global) and which app did you execute lookup command in?

View solution in original post

0 Karma

kikeyama
Splunk Employee
Splunk Employee

What is the permission of lookup definition (Private, App only, or Global) and which app did you execute lookup command in?

0 Karma

diavolo
Path Finder

You're right. I created it in custom app with App permission but used the command at search app. Thank you.

0 Karma

cdoebert
Path Finder

Does Splunk have access to get_lookup.py? The file perms might be overriding the dir perms.

0 Karma

diavolo
Path Finder

Yes, I granted 755 to the py script. The owner is the same as the one who runs splunkd.

0 Karma

dmaislin_splunk
Splunk Employee
Splunk Employee

Did you restart Splunk after you placed that file?

diavolo
Path Finder

Yes, of course I did.

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