Splunk Dev

Can I specify modular Input introspection python version at the script level?

byeckley
Engager

I have put together a python Splunk Modular Input that depends on python3 to execute and works just fine if I have python3 as the default server level python version to use (via server.conf - python.version = python3).

I'm distributing this to various Splunk users and not all of them have this enabled yet. When I try and install this on one of those instances, the introspection fails with syntax errors (Python3 specific syntax) and I can not get the modular input to initialize.

Is there a way to tell the introspection which python to use when initializing the modular input (within the script itself)? I have tried adding the above stanza and setting to defaults/inputs.conf with no luck.

Thanks

Labels (2)
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, ...