All Apps and Add-ons

keep python files inside splunk addon for packaging

sawgata12345
Path Finder

Hi,

I have created a splunk Addon with input configuration defined by Shell script.

here i refer to a shell script /home/user/Documents/bashscript/sample.sh $username$ $password$ $port$ $index$ $mgmtport$
this bash file receives textbox contents from addon UI and calls a python file which is kept at the system location

/home/user/Documents/projectfolder/receiveandupload.py
This python file receives the inputs from the bash file and starts a server connection to a port 5000 and waits to receive data from switch in raw format send via grpc using protocol buffers. this python file converts the raw format to json and sends to splunk at the index and mgmtport received from the bash file.

I can run it in edit stage with the "TEST" button as well as when I select it from left menu and then creating a input form with the text fields created during the creation of the Addon for username , password,port,index,mgmtport. When i use the enabled form Action drop down it calls the sample.sh script and it gets the input from UI and passes to python script and it also works fine by receiving the data from switch and uploads to splunk.

But when i am trying to package the add on its showing error and not creating the addon.

Is it because the python file and the bash file sample.sh is kept in Documents folder ?
Where do I keep the sample.sh file and the projectfolder containing the (protobuf files,python files, and related files) so that i can package the AddOn for distribution ?

Splunk is also installed in this same machine at location /home/user/Documents/Splunk/splunk

Tags (2)
0 Karma
1 Solution

richgalloway
SplunkTrust
SplunkTrust

All files related to an app (add-on) must be in the app's directory ($SPLUNK_HOME/etc/apps/ with .sh and .py files in the bin subdirectory.

---
If this reply helps you, Karma would be appreciated.

View solution in original post

0 Karma

richgalloway
SplunkTrust
SplunkTrust

All files related to an app (add-on) must be in the app's directory ($SPLUNK_HOME/etc/apps/ with .sh and .py files in the bin subdirectory.

---
If this reply helps you, Karma would be appreciated.
0 Karma

sawgata12345
Path Finder

Hi,

Thanks it works.
But while i try to do Validata&Package it shows error "splunk there was a problem connecting to app certification service. the service might not be available at this time or you might need to verify your proxy settings".
Is there anything else I missed?

0 Karma

richgalloway
SplunkTrust
SplunkTrust

Splunk no longer certifies apps. Just package your app, don't validate it.

---
If this reply helps you, Karma would be appreciated.
0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Automating Threat Operations and Threat Hunting with Recorded Future

    Automating Threat Operations and Threat Hunting with Recorded Future June 29, 2026 | Register   Is your ...

Keep the Learning Going with the New Best of .conf Hub

Hello Splunkers, With .conf26 getting closer, there’s already a lot of excitement building around this year’s ...

Splunk Community Badges!

  Hey everyone! Ready to earn some serious bragging rights in the community? Along with our existing badges ...