Splunk Dev

Scripted input strange behavior

a_naoum
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

PavelP
Motivator

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
Get Updates on the Splunk Community!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...