I am stuck. I am using the Splunk Add-on Builder with a Python data input and I want to print my variables that are set in "Data Input Definition" area to the "output" area. I can't get anything to print. Not even "print("HELLO")" will show up. I tried the logging functions and they don't work. I have a text data input called "splunk_hec_url". In " def collect_events" I have this: print("testing")
print(splunk_hec_url_ID) When I click "test", nothing shows up in the output section. What am I doing wrong? How do I get anything to print to the output section? I tried "helper.log_info("log message")" and that doesn't show up either.
... View more
Hello, I am working on a Python script that uses the gitPython package and I am trying to distribute the app as a TA. But I'm having a hard time with how I distribute the dependency (gitPython). I checked out the code another TA and it seemed like they had all of their dependencies in a local file and were able to import them. I've only used pip to install and work with dependencies. How do I install my dependencies to a local folder and how I import them from that folder? UPDATE: I figured it out with the help of madscient and alacercogitatus on the Slack. So to install a package locally: pip3 install -t ./gitpython gitpython Then I had to move the git folder from the gitPython package: mv gitpython/git ./git so that the structure is this: index.py <git> ----Git's files Then I just used from git import Repo in the python script and changed my calls for the repo command to 'Repo'. Not deleting this just in case someone else needs help and finds this.
... View more