<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: External lookup not working in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/External-lookup-not-working/m-p/471180#M8456</link>
    <description>&lt;P&gt;here is the errors in the error log and some surrounding context..&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;04-11-2020 14:49:49.298 INFO  UnifiedSearch - Expanded index search = (index="bro" sourcetype=bro_dns _time&amp;gt;=1554994189.000)
04-11-2020 14:49:49.298 INFO  UnifiedSearch - base lispy: [ AND index::bro sourcetype::bro_dns ]
04-11-2020 14:49:49.298 INFO  UnifiedSearch - Processed search targeting arguments
04-11-2020 14:49:49.298 ERROR ExternalProvider - Command type 'external' is unsupported for lookup 'freqserver'.
04-11-2020 14:49:49.298 ERROR ExternalProvider - Command type 'external' is unsupported for lookup 'freqserver'.
04-11-2020 14:49:49.298 ERROR LookupProcessor - Error in 'lookup' command: Could not construct lookup 'freqserver, domain'. See search.log for more details.
04-11-2020 14:49:49.298 ERROR SearchPhaseGenerator - Fallback to two phase search failed:Error in 'lookup' command: Could not construct lookup 'freqserver, domain'. See search.log for more details.
04-11-2020 14:49:49.299 ERROR SearchOrchestrator - Error in 'lookup' command: Could not construct lookup 'freqserver, domain'. See search.log for more details.
04-11-2020 14:49:49.299 ERROR SearchStatusEnforcer - sid:1586616589.121 Error in 'lookup' command: Could not construct lookup 'freqserver, domain'. See search.log for more details.
04-11-2020 14:49:49.299 INFO  SearchStatusEnforcer - State changed to FAILED due to: Error in 'lookup' command: Could not construct lookup 'freqserver, domain'. See search.log for more details.
04-11-2020 14:49:49.299 INFO  SearchStatusEnforcer - Enforcing disk quota = 10485760000
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Sat, 11 Apr 2020 14:56:24 GMT</pubDate>
    <dc:creator>reswob10</dc:creator>
    <dc:date>2020-04-11T14:56:24Z</dc:date>
    <item>
      <title>External lookup not working</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/External-lookup-not-working/m-p/471178#M8454</link>
      <description>&lt;P&gt;I've looked through several of the other posts on answers regarding this problem and I think I've tried all the suggestions, so here's my post:&lt;/P&gt;

&lt;P&gt;I have a script I put $SPLUNK_HOME/etc/apps/search/bin as below:&lt;/P&gt;

&lt;P&gt;splunk@splunk1:/opt/splunk/etc/apps/search/bin$ ll freq.py&lt;BR /&gt;
-r-xr-xr-x 1 splunk splunk 657 Apr 10 20:33 freq.py*&lt;/P&gt;

&lt;P&gt;It runs fine when testing with splunk python:&lt;/P&gt;

&lt;P&gt;splunk@splunk1:/opt/splunk/etc/apps/search/bin$ /opt/splunk/bin/splunk cmd python ./freq.py splunk.com&lt;BR /&gt;
domain,frequency&lt;BR /&gt;
splunk.com,5.96996388594&lt;/P&gt;

&lt;P&gt;I created a transforms.conf in $SPLUNK_HOME/etc/apps/search/local as below:&lt;/P&gt;

&lt;P&gt;splunk@splunk1:/opt/splunk/etc/apps/search/local$ cat transforms.conf&lt;BR /&gt;
[freqserver]&lt;BR /&gt;
external_cmd = freq.py domain&lt;BR /&gt;
external_type = external&lt;BR /&gt;
fields_list = domain, frequency&lt;/P&gt;

&lt;P&gt;Made sure it had the right linux permissions and owner:&lt;/P&gt;

&lt;P&gt;splunk@splunk1:/opt/splunk/etc/apps/search/local$ ll&lt;BR /&gt;
total 20&lt;BR /&gt;
drwx------  2 splunk splunk 4096 Apr 10 20:56 ./&lt;BR /&gt;
drwxr-xr-x 10 splunk splunk 4096 Mar 10 21:03 ../&lt;BR /&gt;
-rw-------  1 splunk splunk  807 Mar 30 00:49 indexes.conf&lt;BR /&gt;
-rw-------  1 splunk splunk  122 Mar 10 21:49 inputs.conf&lt;BR /&gt;
-rw-------  1 splunk splunk  101 Apr 10 20:56 transforms.conf&lt;/P&gt;

&lt;P&gt;In the lookup definition, for permissions, it says that object should appear in all apps and everyone has read and write permissions.&lt;BR /&gt;&lt;BR /&gt;
I performed all the above as the admin of a single instance of Splunk.&lt;BR /&gt;
I restarted Splunk.&lt;/P&gt;

&lt;P&gt;So now I run a search:&lt;BR /&gt;
index="bro" earliest=-1y sourcetype=bro_dns | fields query | rename query as domain | lookup freqserver domain&lt;/P&gt;

&lt;P&gt;but I get the following error:&lt;/P&gt;

&lt;P&gt;Error in 'lookup' command: Could not construct lookup 'freqserver, domain'. See search.log for more details.&lt;/P&gt;

&lt;P&gt;This is on splunk Version: 8.0.2&lt;/P&gt;

&lt;P&gt;I was trying to follow these instructions for creating a new external lookup:&lt;BR /&gt;
https[:]//docs.splunk.com/Documentation/Splunk/latest/Knowledge/Configureexternallookups&lt;/P&gt;

&lt;P&gt;That error is the same error I get if I try a lookup name that does not exist:&lt;/P&gt;

&lt;P&gt;index="bro" earliest=-1y sourcetype=bro_dns | fields query | rename query as domain | lookup nonsensename domain&lt;/P&gt;

&lt;P&gt;would get the same kind of Could not construct lookup error...&lt;/P&gt;

&lt;P&gt;Any suggestions?&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 04:56:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/External-lookup-not-working/m-p/471178#M8454</guid>
      <dc:creator>reswob10</dc:creator>
      <dc:date>2020-09-30T04:56:09Z</dc:date>
    </item>
    <item>
      <title>Re: External lookup not working</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/External-lookup-not-working/m-p/471179#M8455</link>
      <description>&lt;P&gt;How's search log?&lt;/P&gt;</description>
      <pubDate>Fri, 10 Apr 2020 21:40:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/External-lookup-not-working/m-p/471179#M8455</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-04-10T21:40:24Z</dc:date>
    </item>
    <item>
      <title>Re: External lookup not working</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/External-lookup-not-working/m-p/471180#M8456</link>
      <description>&lt;P&gt;here is the errors in the error log and some surrounding context..&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;04-11-2020 14:49:49.298 INFO  UnifiedSearch - Expanded index search = (index="bro" sourcetype=bro_dns _time&amp;gt;=1554994189.000)
04-11-2020 14:49:49.298 INFO  UnifiedSearch - base lispy: [ AND index::bro sourcetype::bro_dns ]
04-11-2020 14:49:49.298 INFO  UnifiedSearch - Processed search targeting arguments
04-11-2020 14:49:49.298 ERROR ExternalProvider - Command type 'external' is unsupported for lookup 'freqserver'.
04-11-2020 14:49:49.298 ERROR ExternalProvider - Command type 'external' is unsupported for lookup 'freqserver'.
04-11-2020 14:49:49.298 ERROR LookupProcessor - Error in 'lookup' command: Could not construct lookup 'freqserver, domain'. See search.log for more details.
04-11-2020 14:49:49.298 ERROR SearchPhaseGenerator - Fallback to two phase search failed:Error in 'lookup' command: Could not construct lookup 'freqserver, domain'. See search.log for more details.
04-11-2020 14:49:49.299 ERROR SearchOrchestrator - Error in 'lookup' command: Could not construct lookup 'freqserver, domain'. See search.log for more details.
04-11-2020 14:49:49.299 ERROR SearchStatusEnforcer - sid:1586616589.121 Error in 'lookup' command: Could not construct lookup 'freqserver, domain'. See search.log for more details.
04-11-2020 14:49:49.299 INFO  SearchStatusEnforcer - State changed to FAILED due to: Error in 'lookup' command: Could not construct lookup 'freqserver, domain'. See search.log for more details.
04-11-2020 14:49:49.299 INFO  SearchStatusEnforcer - Enforcing disk quota = 10485760000
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 11 Apr 2020 14:56:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/External-lookup-not-working/m-p/471180#M8456</guid>
      <dc:creator>reswob10</dc:creator>
      <dc:date>2020-04-11T14:56:24Z</dc:date>
    </item>
    <item>
      <title>Re: External lookup not working</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/External-lookup-not-working/m-p/471181#M8457</link>
      <description>&lt;P&gt;see: transforms.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;external_type = [python|executable|kvstore|geo|geo_hex]
* This setting describes the external lookup type.
* Use 'python' for external lookups that use a python script.
* Use 'executable' for external lookups that use a binary executable, such as a
  C++ executable.
* Use 'kvstore' for KV store lookups.
* Use 'geo' for geospatial lookups.
* 'geo_hex' is reserved for the geo_hex H3 lookup.
* Default: python
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 11 Apr 2020 20:44:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/External-lookup-not-working/m-p/471181#M8457</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-04-11T20:44:46Z</dc:date>
    </item>
    <item>
      <title>Re: External lookup not working</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/External-lookup-not-working/m-p/471182#M8458</link>
      <description>&lt;P&gt;Thanks.  This was the answer.  &lt;/P&gt;

&lt;P&gt;New transforms.conf&lt;/P&gt;

&lt;P&gt;[freqserver]&lt;BR /&gt;
external_cmd = freq.py domain&lt;BR /&gt;
external_type = python&lt;BR /&gt;
python.version = python2&lt;BR /&gt;
fields_list = domain, frequency&lt;/P&gt;

&lt;P&gt;Of course, if the script is updated to python3, change the setting accordingly.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 04:56:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/External-lookup-not-working/m-p/471182#M8458</guid>
      <dc:creator>reswob10</dc:creator>
      <dc:date>2020-09-30T04:56:19Z</dc:date>
    </item>
    <item>
      <title>Re: External lookup not working</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/External-lookup-not-working/m-p/471183#M8459</link>
      <description>&lt;P&gt;thanks @reswob10&lt;/P&gt;

&lt;P&gt;I was looking for a place to write and usage "python.version" .&lt;BR /&gt;
 In &lt;EM&gt;.conf&lt;/EM&gt; , I'll  write it.&lt;/P&gt;</description>
      <pubDate>Sun, 12 Apr 2020 01:53:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/External-lookup-not-working/m-p/471183#M8459</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-04-12T01:53:06Z</dc:date>
    </item>
  </channel>
</rss>

