<?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 Action: script python: problem with libraries and modules in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Action-script-python-problem-with-libraries-and-modules/m-p/337859#M94897</link>
    <description>&lt;P&gt;Hello Team,&lt;BR /&gt;
I have a sh script (alarm/action) which acts as a wrapper to python script.&lt;/P&gt;

&lt;P&gt;I have several problems with splunk python libraries, followed:&lt;BR /&gt;
&lt;A href="https://answers.splunk.com/answers/8/can-i-add-python-modules-to-the-splunk-environment.html"&gt;https://answers.splunk.com/answers/8/can-i-add-python-modules-to-the-splunk-environment.html&lt;/A&gt;&lt;BR /&gt;
Did not help at all. &lt;BR /&gt;
But only:&lt;BR /&gt;
copy of /usr/local/lib/python2.7/dist-packages&lt;/P&gt;

&lt;P&gt;to&lt;/P&gt;

&lt;P&gt;/opt/splunk/lib/python2.7/site-packages/&lt;/P&gt;

&lt;P&gt;Helped a bit. Now my python script fails on SSL connections with error:&lt;/P&gt;

&lt;P&gt;File "/opt/splunk/lib/python2.7/site-packages/requests/adapters.py", line 506, in send&lt;BR /&gt;
    raise SSLError(e, request=request)&lt;BR /&gt;
requests.exceptions.SSLError: HTTPSConnectionPool(host='xxxx.com', port=443): Max retries exceeded with url: /incident.do?JSONv2 (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.",))'&lt;/P&gt;

&lt;P&gt;What can i do now ?&lt;/P&gt;

&lt;P&gt;I can execute my python script without any problems from SSH, it's just a problems when executed from Splunk....&lt;/P&gt;

&lt;P&gt;Thanks,&lt;/P&gt;</description>
    <pubDate>Mon, 16 Apr 2018 18:28:21 GMT</pubDate>
    <dc:creator>teknet9</dc:creator>
    <dc:date>2018-04-16T18:28:21Z</dc:date>
    <item>
      <title>Action: script python: problem with libraries and modules</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Action-script-python-problem-with-libraries-and-modules/m-p/337859#M94897</link>
      <description>&lt;P&gt;Hello Team,&lt;BR /&gt;
I have a sh script (alarm/action) which acts as a wrapper to python script.&lt;/P&gt;

&lt;P&gt;I have several problems with splunk python libraries, followed:&lt;BR /&gt;
&lt;A href="https://answers.splunk.com/answers/8/can-i-add-python-modules-to-the-splunk-environment.html"&gt;https://answers.splunk.com/answers/8/can-i-add-python-modules-to-the-splunk-environment.html&lt;/A&gt;&lt;BR /&gt;
Did not help at all. &lt;BR /&gt;
But only:&lt;BR /&gt;
copy of /usr/local/lib/python2.7/dist-packages&lt;/P&gt;

&lt;P&gt;to&lt;/P&gt;

&lt;P&gt;/opt/splunk/lib/python2.7/site-packages/&lt;/P&gt;

&lt;P&gt;Helped a bit. Now my python script fails on SSL connections with error:&lt;/P&gt;

&lt;P&gt;File "/opt/splunk/lib/python2.7/site-packages/requests/adapters.py", line 506, in send&lt;BR /&gt;
    raise SSLError(e, request=request)&lt;BR /&gt;
requests.exceptions.SSLError: HTTPSConnectionPool(host='xxxx.com', port=443): Max retries exceeded with url: /incident.do?JSONv2 (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.",))'&lt;/P&gt;

&lt;P&gt;What can i do now ?&lt;/P&gt;

&lt;P&gt;I can execute my python script without any problems from SSH, it's just a problems when executed from Splunk....&lt;/P&gt;

&lt;P&gt;Thanks,&lt;/P&gt;</description>
      <pubDate>Mon, 16 Apr 2018 18:28:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Action-script-python-problem-with-libraries-and-modules/m-p/337859#M94897</guid>
      <dc:creator>teknet9</dc:creator>
      <dc:date>2018-04-16T18:28:21Z</dc:date>
    </item>
  </channel>
</rss>

