<?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: Script command : Error in 'script' command: The external search command Error in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Script-command-Error-in-script-command-The-external-search/m-p/181132#M36331</link>
    <description>&lt;P&gt;I saw a comment in Thread &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Script"&gt;http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Script&lt;/A&gt; to use same name for script and stanza. Hence I tried using samplePython.py and stanza to be: samplePython  . Still not working !!&lt;/P&gt;</description>
    <pubDate>Tue, 17 Dec 2013 11:36:24 GMT</pubDate>
    <dc:creator>koshyk</dc:creator>
    <dc:date>2013-12-17T11:36:24Z</dc:date>
    <item>
      <title>Script command : Error in 'script' command: The external search command Error</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Script-command-Error-in-script-command-The-external-search/m-p/181129#M36328</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;

&lt;P&gt;I'm having issues while running script command within the search. I've tried running something like .. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| savedsearch UsersCount_byDomain_Pie | script python SavedSearch.py
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I've updated "commands.conf" in &lt;STRONG&gt;$SPLUNK_HOME/etc/apps/myApp/local&lt;/STRONG&gt;  (also tried $SPLUNK_HOME/etc/apps/myApp ) and have restarted splunk&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;cat commands.conf
[samplePython]
FILENAME = SavedSearch.py
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I've kept the script under $SPLUNK_HOME/etc/apps/myApp/bin&lt;/P&gt;

&lt;P&gt;Error Shown&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Error in 'script' command: The external search command 'SavedSearch.py' does not exist in commands.conf.
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I've checked the Saved Search and the python Script individually and it works.&lt;/P&gt;

&lt;P&gt;i'm confused if I need to provide absolute path (the example shown in Splunk docs is not sufficient) in the search string?&lt;/P&gt;

&lt;P&gt;(My confusion is "where would you keep the commands.conf and the script ?" I'm not convinced if splunk recognizes the myApp/bin directory correctly)&lt;/P&gt;</description>
      <pubDate>Tue, 17 Dec 2013 10:33:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Script-command-Error-in-script-command-The-external-search/m-p/181129#M36328</guid>
      <dc:creator>koshyk</dc:creator>
      <dc:date>2013-12-17T10:33:06Z</dc:date>
    </item>
    <item>
      <title>Re: Script command : Error in 'script' command: The external search command Error</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Script-command-Error-in-script-command-The-external-search/m-p/181130#M36329</link>
      <description>&lt;P&gt;Your commands.conf should look like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[samplePython]
filename = SavedSearch.py
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Then you can call it like so:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| savedsearch UsersCount_byDomain_Pie | samplePython
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 17 Dec 2013 10:49:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Script-command-Error-in-script-command-The-external-search/m-p/181130#M36329</guid>
      <dc:creator>dart</dc:creator>
      <dc:date>2013-12-17T10:49:29Z</dc:date>
    </item>
    <item>
      <title>Re: Script command : Error in 'script' command: The external search command Error</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Script-command-Error-in-script-command-The-external-search/m-p/181131#M36330</link>
      <description>&lt;P&gt;Hmm.. not working. Without script it says &lt;BR /&gt;
Unknown search command 'samplepython'.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Dec 2013 11:34:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Script-command-Error-in-script-command-The-external-search/m-p/181131#M36330</guid>
      <dc:creator>koshyk</dc:creator>
      <dc:date>2013-12-17T11:34:10Z</dc:date>
    </item>
    <item>
      <title>Re: Script command : Error in 'script' command: The external search command Error</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Script-command-Error-in-script-command-The-external-search/m-p/181132#M36331</link>
      <description>&lt;P&gt;I saw a comment in Thread &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Script"&gt;http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Script&lt;/A&gt; to use same name for script and stanza. Hence I tried using samplePython.py and stanza to be: samplePython  . Still not working !!&lt;/P&gt;</description>
      <pubDate>Tue, 17 Dec 2013 11:36:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Script-command-Error-in-script-command-The-external-search/m-p/181132#M36331</guid>
      <dc:creator>koshyk</dc:creator>
      <dc:date>2013-12-17T11:36:24Z</dc:date>
    </item>
    <item>
      <title>Re: Script command : Error in 'script' command: The external search command Error</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Script-command-Error-in-script-command-The-external-search/m-p/181133#M36332</link>
      <description>&lt;P&gt;I had the same problem - adding the stanza to commands.conf in the SPLUNK_HOME/etc/apps/myApp/default folder (and not local folder) calls the script correctly.&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jun 2015 21:04:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Script-command-Error-in-script-command-The-external-search/m-p/181133#M36332</guid>
      <dc:creator>nivedita_viswan</dc:creator>
      <dc:date>2015-06-25T21:04:38Z</dc:date>
    </item>
    <item>
      <title>Re: Script command : Error in 'script' command: The external search command Error</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Script-command-Error-in-script-command-The-external-search/m-p/181134#M36333</link>
      <description>&lt;P&gt;Hi, &lt;/P&gt;

&lt;P&gt;I know this is an old question, but I got the same issue and this is how I solved it:&lt;/P&gt;

&lt;P&gt;First, you have to create the file authorize.conf on /detault (or /local folders), having this content:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;gt; [capability::run_script_samplePython]
&amp;gt; 
&amp;gt; [role_admin]
&amp;gt; run_script_samplePython=enabled
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Then, you can execute the command &lt;CODE&gt;| samplePython&lt;/CODE&gt;, but be shure you are working within the search of your app. If you want to execute the command with global permissions, you'll need to change the permissions of your app (since the app access is not allowed for global execution by default).&lt;/P&gt;

&lt;P&gt;Hope it helps.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jan 2019 11:04:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Script-command-Error-in-script-command-The-external-search/m-p/181134#M36333</guid>
      <dc:creator>faguilar</dc:creator>
      <dc:date>2019-01-16T11:04:53Z</dc:date>
    </item>
    <item>
      <title>Re: Script command : Error in 'script' command: The external search command Error</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Script-command-Error-in-script-command-The-external-search/m-p/181135#M36334</link>
      <description>&lt;P&gt;thanks mate.&lt;/P&gt;</description>
      <pubDate>Thu, 31 Jan 2019 13:40:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Script-command-Error-in-script-command-The-external-search/m-p/181135#M36334</guid>
      <dc:creator>koshyk</dc:creator>
      <dc:date>2019-01-31T13:40:21Z</dc:date>
    </item>
    <item>
      <title>Re: Script command : Error in 'script' command: The external search command Error</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Script-command-Error-in-script-command-The-external-search/m-p/181136#M36335</link>
      <description>&lt;P&gt;Thanks,&lt;BR /&gt;
For me putting the configurations in default folder worked. &lt;BR /&gt;
Just fyi if you put the script in  system\bin and configurations in system\local it will work as well.&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jul 2019 20:23:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Script-command-Error-in-script-command-The-external-search/m-p/181136#M36335</guid>
      <dc:creator>ss026381</dc:creator>
      <dc:date>2019-07-19T20:23:34Z</dc:date>
    </item>
  </channel>
</rss>

