The easiest way to debug your scripts is to put a launcher in front of it. The idea is to redirect stdout and stderr to a file when the script runs. Thus allowing you to see what's going on. Below is what I use on RedHat for launching a python script.
#!/bin/bash
#
# We need to lauch the python script from Bash so we can use the python version within the OS. This
# allows us to install the python modules we need from the package manager of the OS. The python
# that comes with Splunk most likely won't have the modules you require. Thus we use the one from
# the OS.
#
# Debug
# Use the following line to debug. send stdout stderr to the file specified below
/usr/bin/python /opt/splunk/bin/scripts/<YOURSCRIPT> "$@" >>/var/tmp/file.txt 2>&1
# production
#/usr/bin/python /opt/splunk/bin/scripts/<YOURSCRIPT> "$@"
The "$@" takes the args that were passed to the launcher and re-passes them to the real script. The secondary reason I use a launcher is I don't want to use the version of Python that comes built into Splunk.
... View more
In your server.conf add the following: (This setting adjusts all queues)
[queue]
maxSize = 500MB # this can be KB,MB, or GB.
You can also specify specific queues, but I was unable to get it to work. See server.conf spec.
... View more
The fix for this problem is to create a home directory for the splunk account. Make sure you create it and set the appropriate permissions.
# mkdir /home/splunk
# chown splunk /home/splunk/
# chgrp splunk /home/splunk/
Then restart splunk.
... View more