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!

Introducing Splunk Enterprise 9.2

WATCH HERE! Watch this Tech Talk to learn about the latest features and enhancements shipped in the new Splunk ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...