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!

Introduction to Splunk Observability Cloud - Building a Resilient Hybrid Cloud

Introduction to Splunk Observability Cloud - Building a Resilient Hybrid Cloud  In today’s fast-paced digital ...

Observability protocols to know about

Observability protocols define the specifications or formats for collecting, encoding, transporting, and ...

Take Your Breath Away with Splunk Risk-Based Alerting (RBA)

WATCH NOW!The Splunk Guide to Risk-Based Alerting is here to empower your SOC like never before. Join Haylee ...