Getting Data In

Action: script python: problem with libraries and modules

teknet9
Path Finder

Hello Team,
I have a sh script (alarm/action) which acts as a wrapper to python script.

I have several problems with splunk python libraries, followed:
https://answers.splunk.com/answers/8/can-i-add-python-modules-to-the-splunk-environment.html
Did not help at all.
But only:
copy of /usr/local/lib/python2.7/dist-packages

to

/opt/splunk/lib/python2.7/site-packages/

Helped a bit. Now my python script fails on SSL connections with error:

File "/opt/splunk/lib/python2.7/site-packages/requests/adapters.py", line 506, in send
raise SSLError(e, request=request)
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.",))'

What can i do now ?

I can execute my python script without any problems from SSH, it's just a problems when executed from Splunk....

Thanks,

Tags (1)
0 Karma
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...