Hey Everyone,
Been struggling with this for hours now, when trying to run a custom search command I get:
'import site' failed; use -v for traceback
Traceback (most recent call last):
File "generatehello.py", line 2, in <module>
from splunklib.searchcommands import \
ImportError: No module named splunklib.searchcommands
I tried to make sure I had the Python SDK installed which I thought I did, but upon attempting that I get:
Traceback (most recent call last):
File "setup.py", line 17, in <module>
from setuptools import setup, Command
So really confused at this point how to set this thing up. I have seem all sorts of stuff about PYTHONPATH and setting that up, but it's been pretty unclear. To run Splunks bundled Python, I have been using the command:
"/apps/splunk/bin/splunk cmd python <pythonfile.py>"
Not sure if that is correct either. Could really use some guidance. Everything has been pretty confusing so far. I have had my $SPLUNK_HOME set to /apps/splunk as well.
I had gotten it running on 2.6, but unfortunately, the search command contains some method that was not added until 2.7 so I wasn't able to use it.
... View more