<?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 SDK Requirements: Why is my script failing when attempting to access Splunk server from another VM? in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/Python-SDK-Requirements-Why-is-my-script-failing-when-attempting/m-p/280944#M3530</link>
    <description>&lt;P&gt;&lt;STRONG&gt;Scenario:&lt;/STRONG&gt; Accessing remote Splunk Enterprise server from another VM using Python SDK that does not have Splunk Enterprise installed. &lt;BR /&gt;
&lt;STRONG&gt;Issue:&lt;/STRONG&gt; Added a scripts in directory /splunk-sdk-python-1.6.2/examples but it is failing.&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;For instance: 
[root@VMW-ELK-TEST-01 examples]# python runsearch.py 
Traceback (most recent call last):
File "runsearch.py", line 3, in 
import splunklib.results as results
ImportError: No module named splunklib.results&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;&lt;STRONG&gt;Questions:&lt;/STRONG&gt;&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;Is this happening because the VM wherein I am running this script does not have Splunk Enterprise installed?&lt;/LI&gt;
&lt;LI&gt;If so, what are the alternatives to interacting with the Splunk Enterprise cluster from a "Scripts" VM wherein we do not want to pay for licensing and just use the SDK API wrapper to interact.&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;&lt;STRONG&gt;P.S.&lt;/STRONG&gt;&lt;BR /&gt;
I  was able to get one of the sample scripts in the examples directory to work accordingly:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;python search.py "search index=pci_jbx_index * | head 10" --host=a.b.c.d --username="abc" --password="def" --output_mode=csv --verbose=verbose
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thanks everyone in advance,&lt;BR /&gt;
-Mohammad&lt;/P&gt;</description>
    <pubDate>Tue, 07 Feb 2017 17:25:00 GMT</pubDate>
    <dc:creator>mhassan24</dc:creator>
    <dc:date>2017-02-07T17:25:00Z</dc:date>
    <item>
      <title>Python SDK Requirements: Why is my script failing when attempting to access Splunk server from another VM?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Python-SDK-Requirements-Why-is-my-script-failing-when-attempting/m-p/280944#M3530</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Scenario:&lt;/STRONG&gt; Accessing remote Splunk Enterprise server from another VM using Python SDK that does not have Splunk Enterprise installed. &lt;BR /&gt;
&lt;STRONG&gt;Issue:&lt;/STRONG&gt; Added a scripts in directory /splunk-sdk-python-1.6.2/examples but it is failing.&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;For instance: 
[root@VMW-ELK-TEST-01 examples]# python runsearch.py 
Traceback (most recent call last):
File "runsearch.py", line 3, in 
import splunklib.results as results
ImportError: No module named splunklib.results&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;&lt;STRONG&gt;Questions:&lt;/STRONG&gt;&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;Is this happening because the VM wherein I am running this script does not have Splunk Enterprise installed?&lt;/LI&gt;
&lt;LI&gt;If so, what are the alternatives to interacting with the Splunk Enterprise cluster from a "Scripts" VM wherein we do not want to pay for licensing and just use the SDK API wrapper to interact.&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;&lt;STRONG&gt;P.S.&lt;/STRONG&gt;&lt;BR /&gt;
I  was able to get one of the sample scripts in the examples directory to work accordingly:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;python search.py "search index=pci_jbx_index * | head 10" --host=a.b.c.d --username="abc" --password="def" --output_mode=csv --verbose=verbose
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thanks everyone in advance,&lt;BR /&gt;
-Mohammad&lt;/P&gt;</description>
      <pubDate>Tue, 07 Feb 2017 17:25:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Python-SDK-Requirements-Why-is-my-script-failing-when-attempting/m-p/280944#M3530</guid>
      <dc:creator>mhassan24</dc:creator>
      <dc:date>2017-02-07T17:25:00Z</dc:date>
    </item>
    <item>
      <title>Re: Python SDK Requirements: Why is my script failing when attempting to access Splunk server from another VM?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Python-SDK-Requirements-Why-is-my-script-failing-when-attempting/m-p/280945#M3531</link>
      <description>&lt;P&gt;Yes, the runsearch.py script is failing because Splunk is not installed on the local system.  Splunk-provided python includes modules specific to Splunk.  You have a couple of options:&lt;/P&gt;

&lt;P&gt;1) Install Splunk on the scripts VM.  There is no cost to install the software.  If you never run it there will be no licensing costs, either.&lt;BR /&gt;
2) Copy the splunklib.py module from your Splunk system to the scripts VM.  There may be other modules to copy as well, which you'll discover through trial-and-error.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Feb 2017 18:20:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Python-SDK-Requirements-Why-is-my-script-failing-when-attempting/m-p/280945#M3531</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2017-02-07T18:20:42Z</dc:date>
    </item>
    <item>
      <title>Re: Python SDK Requirements: Why is my script failing when attempting to access Splunk server from another VM?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Python-SDK-Requirements-Why-is-my-script-failing-when-attempting/m-p/280946#M3532</link>
      <description>&lt;P&gt;Thanks Rich. That makes sense. I'll install it and let it automatically become the free edition after the trial expires&lt;/P&gt;</description>
      <pubDate>Tue, 07 Feb 2017 19:54:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Python-SDK-Requirements-Why-is-my-script-failing-when-attempting/m-p/280946#M3532</guid>
      <dc:creator>mhassan24</dc:creator>
      <dc:date>2017-02-07T19:54:21Z</dc:date>
    </item>
  </channel>
</rss>

