Developing for Splunk Enterprise

Scripted input strange behavior

Path Finder

Good to all,
I have a strange behavior of a python script. The specific python script collects some AWS data. if I run it as it is, it works nicely. If I run through Splunk's python (bin/splunk python) it also runs. If I schedule it, I get errors related to access to AWS.
Especially with the second try (via Splunk's python) I had the impression that I could "emulate" how it will run when it is going to be enabled but appears that that is not the case.
Is there any other way to troubleshoot this?

Labels (1)
0 Karma


Hello @a_naoum

a script running under $SPLUNK_HOME/bin/splunk cmd python should have similar environment as your scheduled script, so probably you run it as a different user (root?).

Use the common way to troubleshoot, just add some print here and there, especially before the code part where AWS request is done, additionally print the raw response.

0 Karma
Did you miss .conf21 Virtual?

Good news! The event's keynotes and many of its breakout sessions are now available online, and still totally FREE!