Splunk Dev

How do I tell Splunk to use system python versus embedded python

scottsavarese
New Member

I'm writing an alert action custom app. However the embedded python3 will not let me use a required library that has a compiled C library in it (.so file). /opt/splunk/bin/python3 for some reason won't link it.

Is there a way to tell Splunk's (I'm on splunk 8.1.0) to load the compiled C libraries? That would be the best way.

I noticed that the system /usr/bin/python3 works just fine. How do I tell Splunk to use that in my alert action script conf file or the script itself? I have `splunk.version=python3` in the config file and I've tried both '#!/usr/bin/python3' and '#!/usr/bin/env python3' at the top of my script. I'm thinking that I may need to write a shell script shim that simply calls my script the right way. But I'd like to avoid that if possible (not even sure it would work in the newer versions of Splunk.

Thanks!

 

 

Labels (2)
0 Karma
Get Updates on the Splunk Community!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...