<?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: Using python external lookup An error occurs when requesting an HTTPS website in Monitoring Splunk</title>
    <link>https://community.splunk.com/t5/Monitoring-Splunk/Using-python-external-lookup-An-error-occurs-when-requesting-an/m-p/428861#M6271</link>
    <description>&lt;P&gt;Converted to answer &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt; &lt;/P&gt;

&lt;P&gt;cheers, MuS&lt;/P&gt;</description>
    <pubDate>Wed, 13 Mar 2019 18:48:27 GMT</pubDate>
    <dc:creator>MuS</dc:creator>
    <dc:date>2019-03-13T18:48:27Z</dc:date>
    <item>
      <title>Using python external lookup An error occurs when requesting an HTTPS website</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/Using-python-external-lookup-An-error-occurs-when-requesting-an/m-p/428856#M6266</link>
      <description>&lt;P&gt;I have a simple external lookup python script  that implements a simple post request and returns the result to the splunk search.I know the script will call splunk built-in python, so I suspect that there is a problem with the built-in   ssl library  , which causes the script to fail to request the https website.&lt;/P&gt;

&lt;P&gt;When running python script with module requests to get https response,it occurrs a error 'NoneType' object has no attribute 'wrap_socket'.  &lt;/P&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/6663iCC0573DCF2F884E1/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;If I put splunk's python executable file (/opt/splunk/bin/python2.7 )  soft link to linux os python， everything works fine. However, some functions of splunk become unusable. For example, splunk will return an error when creating a new user. This is because I changed the soft link of the splunk python executable. So I can't modify splunk's python program at random. &lt;/P&gt;

&lt;P&gt;So how to solve this problem? Who can provide an example of an external lookup script that requests the https website?&lt;/P&gt;

&lt;P&gt;all help would be greatly appreciated.&lt;/P&gt;

&lt;P&gt;splunk verson  6.4.3&lt;/P&gt;</description>
      <pubDate>Tue, 12 Mar 2019 06:26:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/Using-python-external-lookup-An-error-occurs-when-requesting-an/m-p/428856#M6266</guid>
      <dc:creator>bestSplunker</dc:creator>
      <dc:date>2019-03-12T06:26:00Z</dc:date>
    </item>
    <item>
      <title>Re: Using python external lookup An error occurs when requesting an HTTPS website</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/Using-python-external-lookup-An-error-occurs-when-requesting-an/m-p/428857#M6267</link>
      <description>&lt;P&gt;As you have noticed, you should not try to replace/link the python packages with that of the local OS - bad things will happen.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Mar 2019 10:38:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/Using-python-external-lookup-An-error-occurs-when-requesting-an/m-p/428857#M6267</guid>
      <dc:creator>nickhills</dc:creator>
      <dc:date>2019-03-12T10:38:59Z</dc:date>
    </item>
    <item>
      <title>Re: Using python external lookup An error occurs when requesting an HTTPS website</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/Using-python-external-lookup-An-error-occurs-when-requesting-an/m-p/428858#M6268</link>
      <description>&lt;P&gt;@nickhillscpl  OK,So is splunk's built-in SSL lib in  wrong ? Have you ever used external lookups to request HTTPS websites? Have you ever encountered such a problem?&lt;/P&gt;</description>
      <pubDate>Wed, 13 Mar 2019 00:59:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/Using-python-external-lookup-An-error-occurs-when-requesting-an/m-p/428858#M6268</guid>
      <dc:creator>bestSplunker</dc:creator>
      <dc:date>2019-03-13T00:59:14Z</dc:date>
    </item>
    <item>
      <title>Re: Using python external lookup An error occurs when requesting an HTTPS website</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/Using-python-external-lookup-An-error-occurs-when-requesting-an/m-p/428859#M6269</link>
      <description>&lt;P&gt;The easiest option would be to place the OS &lt;CODE&gt;requests&lt;/CODE&gt; module into your apps &lt;CODE&gt;bin&lt;/CODE&gt; directory so this will be loaded. Another option is to insert the OS Python module path before the Splunk Python module path in your script.&lt;/P&gt;

&lt;P&gt;I did both previously in Python scripts and it work just fine.&lt;/P&gt;

&lt;P&gt;cheers, MuS&lt;/P&gt;</description>
      <pubDate>Wed, 13 Mar 2019 02:38:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/Using-python-external-lookup-An-error-occurs-when-requesting-an/m-p/428859#M6269</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2019-03-13T02:38:14Z</dc:date>
    </item>
    <item>
      <title>Re: Using python external lookup An error occurs when requesting an HTTPS website</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/Using-python-external-lookup-An-error-occurs-when-requesting-an/m-p/428860#M6270</link>
      <description>&lt;P&gt;@MuS  Good answer, I hope I can recommend your answer, because you write a comment, I can not recommend your answer.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Mar 2019 07:17:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/Using-python-external-lookup-An-error-occurs-when-requesting-an/m-p/428860#M6270</guid>
      <dc:creator>bestSplunker</dc:creator>
      <dc:date>2019-03-13T07:17:46Z</dc:date>
    </item>
    <item>
      <title>Re: Using python external lookup An error occurs when requesting an HTTPS website</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/Using-python-external-lookup-An-error-occurs-when-requesting-an/m-p/428861#M6271</link>
      <description>&lt;P&gt;Converted to answer &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt; &lt;/P&gt;

&lt;P&gt;cheers, MuS&lt;/P&gt;</description>
      <pubDate>Wed, 13 Mar 2019 18:48:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/Using-python-external-lookup-An-error-occurs-when-requesting-an/m-p/428861#M6271</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2019-03-13T18:48:27Z</dc:date>
    </item>
  </channel>
</rss>

