<?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 Python scripted lookup doesn't produce any results in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/Python-scripted-lookup-doesn-t-produce-any-results/m-p/20050#M149</link>
    <description>&lt;P&gt;Hi, 
I have created an scripted lookup (app) that looks up data in MongoDB and returns some results.&lt;/P&gt;

&lt;P&gt;I have used an existing lookup (that works) as a template.
When I test my lookup from the console with
~/bin/splunk cmd python lookup.py &amp;lt; input.csv
it works (just as the other script that I used as a base), however, when searching from splunk it returns no result:&lt;/P&gt;

&lt;P&gt;app.conf &lt;/P&gt;

&lt;P&gt;[ui]
is_visible = false
label = MongoLookup&lt;/P&gt;

&lt;P&gt;transforms.conf &lt;/P&gt;

&lt;P&gt;[mlookup]
external_cmd = lookup.py 
fields_list = clientuid country cref refid&lt;/P&gt;

&lt;P&gt;Searching with:
index="idx_XXXXXX" sourcetype="YYYYYYY" | lookup mlookup clientuid as userID | table userID, country&lt;/P&gt;

&lt;P&gt;I get no results for country,cref,refid &lt;/P&gt;

&lt;P&gt;Is there a way I could see what's splunk doing when calling my script?&lt;/P&gt;</description>
    <pubDate>Tue, 04 Jan 2011 07:41:28 GMT</pubDate>
    <dc:creator>ultra</dc:creator>
    <dc:date>2011-01-04T07:41:28Z</dc:date>
    <item>
      <title>Python scripted lookup doesn't produce any results</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Python-scripted-lookup-doesn-t-produce-any-results/m-p/20050#M149</link>
      <description>&lt;P&gt;Hi, 
I have created an scripted lookup (app) that looks up data in MongoDB and returns some results.&lt;/P&gt;

&lt;P&gt;I have used an existing lookup (that works) as a template.
When I test my lookup from the console with
~/bin/splunk cmd python lookup.py &amp;lt; input.csv
it works (just as the other script that I used as a base), however, when searching from splunk it returns no result:&lt;/P&gt;

&lt;P&gt;app.conf &lt;/P&gt;

&lt;P&gt;[ui]
is_visible = false
label = MongoLookup&lt;/P&gt;

&lt;P&gt;transforms.conf &lt;/P&gt;

&lt;P&gt;[mlookup]
external_cmd = lookup.py 
fields_list = clientuid country cref refid&lt;/P&gt;

&lt;P&gt;Searching with:
index="idx_XXXXXX" sourcetype="YYYYYYY" | lookup mlookup clientuid as userID | table userID, country&lt;/P&gt;

&lt;P&gt;I get no results for country,cref,refid &lt;/P&gt;

&lt;P&gt;Is there a way I could see what's splunk doing when calling my script?&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jan 2011 07:41:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Python-scripted-lookup-doesn-t-produce-any-results/m-p/20050#M149</guid>
      <dc:creator>ultra</dc:creator>
      <dc:date>2011-01-04T07:41:28Z</dc:date>
    </item>
    <item>
      <title>Re: Python scripted lookup doesn't produce any results</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Python-scripted-lookup-doesn-t-produce-any-results/m-p/20051#M150</link>
      <description>&lt;P&gt;The error output of scripted inputs is indexed by Splunk in the _internal index.  You can search the errors with a similar search to the following:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="_internal" error myscript.sh
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You should see notices that look like "ERROR ExecProcessor", followed by the script path/name.&lt;/P&gt;

&lt;P&gt;This data is also kept in $SPLUNK_HOME/var/log/splunk in splunkd.log.&lt;/P&gt;

&lt;P&gt;HTH,&lt;BR /&gt;
Ron&lt;/P&gt;</description>
      <pubDate>Fri, 04 Feb 2011 04:03:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Python-scripted-lookup-doesn-t-produce-any-results/m-p/20051#M150</guid>
      <dc:creator>Ron_Naken</dc:creator>
      <dc:date>2011-02-04T04:03:21Z</dc:date>
    </item>
  </channel>
</rss>

