<?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: Problem running Custom Script in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Problem-running-Custom-Script/m-p/60533#M12012</link>
    <description>&lt;P&gt;Try removing the underscore in: [get_asn]&lt;/P&gt;

&lt;P&gt;I'm not 100% sure but I just started learning to use custom command with a perl script and this seemed to fix my issue.&lt;/P&gt;</description>
    <pubDate>Thu, 06 Jun 2013 18:00:06 GMT</pubDate>
    <dc:creator>jpass</dc:creator>
    <dc:date>2013-06-06T18:00:06Z</dc:date>
    <item>
      <title>Problem running Custom Script</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Problem-running-Custom-Script/m-p/60528#M12007</link>
      <description>&lt;P&gt;Have created a custom Perl script, added it to commands.conf - it finds the script just fine. The script outputs the correct data, but whenever I run it Splunk gives me these errors:&lt;/P&gt;

&lt;P&gt;External search command 'get_asn' returned error code 9. 
Script output = "String found where operator expected at /services/splunk/bin/runScript.py line 19, near """ (Might be a runaway multi-line "" string starting on line 1) (Missing semicolon on previous line?) 
String found where operator expected at /services/splunk/bin/runScript.py line 19, near """"" (Missing operator before ""?) 
Semicolon seems to be missing at /services/splunk/bin/runScript.py line 20. 
Bareword found where operator expected at /services/splunk/bin/runScript.py line 25, near ""UNIT_TEST_EXTRA_LOGGING" in" (Missing operator before in?) syntax error at /services/splunk/bin/runScript.py line 19, near """ 
Execution of /services/splunk/bin/runScript.py aborted due to compilation errors. "&lt;/P&gt;

&lt;P&gt;I've looked over the runScript.py file, I didn't see any problems with that. &lt;/P&gt;

&lt;P&gt;Any suggestions?&lt;/P&gt;

&lt;P&gt;Edit:
Here's my commands.conf file as requested. This is per the Splunk.com entry on commands.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[get_asn]
type = perl
filename = get_asn.pl
streaming = true
retainsevents = true
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 16 Mar 2011 08:39:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Problem-running-Custom-Script/m-p/60528#M12007</guid>
      <dc:creator>Greg_LeBlanc</dc:creator>
      <dc:date>2011-03-16T08:39:43Z</dc:date>
    </item>
    <item>
      <title>Re: Problem running Custom Script</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Problem-running-Custom-Script/m-p/60529#M12008</link>
      <description>&lt;P&gt;Umm, .py files are python scripts aren't they ? &lt;/P&gt;

&lt;P&gt;Not sure if SPLUNK supports perl scripts, but I would change the extension to a .pl in case that is screwing with the script interpreters.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Mar 2011 08:56:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Problem-running-Custom-Script/m-p/60529#M12008</guid>
      <dc:creator>Medavian</dc:creator>
      <dc:date>2011-03-16T08:56:03Z</dc:date>
    </item>
    <item>
      <title>Re: Problem running Custom Script</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Problem-running-Custom-Script/m-p/60530#M12009</link>
      <description>&lt;P&gt;I don't know, but I suspect it's a problem running Perl scripts when most search scripts are Python. I assume you have no trouble running, say "rangemap"? I guess it would interesting to see the commands.conf entry (whether you have set the &lt;CODE&gt;type&lt;/CODE&gt; to &lt;CODE&gt;perl&lt;/CODE&gt;, and whether you are running distributed search. It may also just be a bug.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Mar 2011 08:58:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Problem-running-Custom-Script/m-p/60530#M12009</guid>
      <dc:creator>gkanapathy</dc:creator>
      <dc:date>2011-03-16T08:58:11Z</dc:date>
    </item>
    <item>
      <title>Re: Problem running Custom Script</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Problem-running-Custom-Script/m-p/60531#M12010</link>
      <description>&lt;P&gt;Rangemap works great, I will add my commands.conf entry above. And yes - I am using distributed search over n number of indexes.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Mar 2011 19:21:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Problem-running-Custom-Script/m-p/60531#M12010</guid>
      <dc:creator>Greg_LeBlanc</dc:creator>
      <dc:date>2011-03-16T19:21:36Z</dc:date>
    </item>
    <item>
      <title>Re: Problem running Custom Script</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Problem-running-Custom-Script/m-p/60532#M12011</link>
      <description>&lt;P&gt;Splunk supports PERL Scripts.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jun 2013 17:58:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Problem-running-Custom-Script/m-p/60532#M12011</guid>
      <dc:creator>jpass</dc:creator>
      <dc:date>2013-06-06T17:58:16Z</dc:date>
    </item>
    <item>
      <title>Re: Problem running Custom Script</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Problem-running-Custom-Script/m-p/60533#M12012</link>
      <description>&lt;P&gt;Try removing the underscore in: [get_asn]&lt;/P&gt;

&lt;P&gt;I'm not 100% sure but I just started learning to use custom command with a perl script and this seemed to fix my issue.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jun 2013 18:00:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Problem-running-Custom-Script/m-p/60533#M12012</guid>
      <dc:creator>jpass</dc:creator>
      <dc:date>2013-06-06T18:00:06Z</dc:date>
    </item>
  </channel>
</rss>

