<?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 script on search head in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/external-lookup-script-on-search-head/m-p/44728#M10567</link>
    <description>&lt;P&gt;Figured it out. &lt;/P&gt;

&lt;P&gt;Had to put the lookup into it's own app, and put a distsearch.conf file into default/ with a blacklist that prevented the entire app from being replicated.&lt;/P&gt;

&lt;P&gt;[replicationBlacklist]&lt;BR /&gt;
staylocal = apps/&lt;APP name=""&gt;...&lt;/APP&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 24 May 2013 20:08:24 GMT</pubDate>
    <dc:creator>sf_user_199</dc:creator>
    <dc:date>2013-05-24T20:08:24Z</dc:date>
    <item>
      <title>external lookup script on search head</title>
      <link>https://community.splunk.com/t5/Splunk-Search/external-lookup-script-on-search-head/m-p/44727#M10566</link>
      <description>&lt;P&gt;I've written an external lookup script that makes a rest call to an API &amp;amp; returns data.  The API destination requires going through a firewall, so we are only allowing our search head to make the call.&lt;/P&gt;

&lt;P&gt;When I use the lookup using tstats on the search head, the lookup executes very quickly.  When I use it against searches that pull data from our indexers, the indexers appear to be running the script.  This fails, however, due to the firewall not being open for the script to run.&lt;/P&gt;

&lt;P&gt;I have local=true set on the lookup command, and also used localop&lt;/P&gt;

&lt;P&gt;Search:&lt;BR /&gt;
&lt;FIND apache="" data="https://community.splunk.com/"&gt; | head 1 | localop | lookup local=true XXXX fieldA | table fieldA,lookupvalue&lt;/FIND&gt;&lt;/P&gt;

&lt;P&gt;From the search inspector:&lt;BR /&gt;
This search has completed and has returned 1 result by scanning 671 event in 1,141.566 seconds.&lt;/P&gt;

&lt;P&gt;Error message in the search inspector for every indexer:&lt;BR /&gt;
Script for lookup table 'XXXX' returned error code 1. Results may be incorrect.&lt;/P&gt;

&lt;P&gt;Any suggestions?  My next step is to block replication of this to indexers. &lt;/P&gt;</description>
      <pubDate>Thu, 23 May 2013 23:29:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/external-lookup-script-on-search-head/m-p/44727#M10566</guid>
      <dc:creator>sf_user_199</dc:creator>
      <dc:date>2013-05-23T23:29:19Z</dc:date>
    </item>
    <item>
      <title>Re: external lookup script on search head</title>
      <link>https://community.splunk.com/t5/Splunk-Search/external-lookup-script-on-search-head/m-p/44728#M10567</link>
      <description>&lt;P&gt;Figured it out. &lt;/P&gt;

&lt;P&gt;Had to put the lookup into it's own app, and put a distsearch.conf file into default/ with a blacklist that prevented the entire app from being replicated.&lt;/P&gt;

&lt;P&gt;[replicationBlacklist]&lt;BR /&gt;
staylocal = apps/&lt;APP name=""&gt;...&lt;/APP&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 24 May 2013 20:08:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/external-lookup-script-on-search-head/m-p/44728#M10567</guid>
      <dc:creator>sf_user_199</dc:creator>
      <dc:date>2013-05-24T20:08:24Z</dc:date>
    </item>
  </channel>
</rss>

