Building for the Splunk Platform

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!

Routing Data to Different Splunk Indexes in the OpenTelemetry Collector

This blog post is part of an ongoing series on OpenTelemetry. The OpenTelemetry project is the second largest ...

Getting Started with AIOps: Event Correlation Basics and Alert Storm Detection in ...

Getting Started with AIOps:Event Correlation Basics and Alert Storm Detection in Splunk IT Service ...

Register to Attend BSides SPL 2022 - It's all Happening October 18!

Join like-minded individuals for technical sessions on everything Splunk!  This is a community-led and run ...