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!

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...

.conf24 | Personalize your .conf experience with Learning Paths!

Personalize your .conf24 Experience Learning paths allow you to level up your skill sets and dive deeper ...

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...