All Apps and Add-ons

how execute command at backend from a externally added button in the Inputs tab of a AddOn

sawgata12345
Path Finder

Hi,
I have created a Addon using the AddonBuilder in splunk.
it has three tabs Inputs|Configuration|Search
In the inputs tab a button appears "Create New Input". I want to add one more button just beside it and on click of the event i want to stop a python script.
While creating the Addon in the "Configure Data Collection " section I choose "Modular Inputs as Shell commands". there in the "Data Inputs Definition" tab i given
/home//testmain.sh
inside the .sh file:
/home//application/app1/test.py & (this starts it as daemon. the test.py has internal loop which keeps waiting for input, once it receives input it formats data and send to splunk at a specific index)

This .sh file is starting a python script in background which keeps on running.
In the Addon we have enable/disable option to prevent Splunk executing testmain.sh after every interval(mandatory to provide), but I want to kill python process by adding a button beside the "Create New Input". on click of the button it should stop the python script.
I can however again enable the python script from the Addon UI enable/disable option of the Actions.
How do I add the button and send an event so in backend it kills the python file.

0 Karma

chli_splunk
Splunk Employee
Splunk Employee

Currently it's not possible since AoB is leveraging another component to render data input configuration UI.

0 Karma

sawgata12345
Path Finder

ok, cant we send any rest call or edit the " another component" to add one more line same as for "Create New Input". This "another component " will also be present inside the addon folder created as "TA-sampleapp" or those components are defined in some other location?

Is it possible to create a App instead of Addon and do the above?
I created a "SampleApp", in backend it also created similar folder "TA-sampleapp". Is it possible to add one button for start and one button for stop?
I changed the config files in the default and local folders but nothing is changing on the UI.

0 Karma

chli_splunk
Splunk Employee
Splunk Employee

The data input configuration UI framework has both frontend components and backend rest endpoints. It's not easy to figure out a quick solution by "hacking" existing framework, otherwise it's more like a feature request.

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!

[Puzzles] Solve, Learn, Repeat: Matching cron expressions

This puzzle (first published here) is based on matching timestamps to cron expressions.All the timestamps ...

Design, Compete, Win: Submit Your Best Splunk Dashboards for a .conf26 Pass

Hello Splunkers,  We’re excited to kick off a Splunk Dashboard contest! We know that dashboards are a primary ...

May 2026 Splunk Expert Sessions: Security & Observability

Level Up Your Operations: May 2026 Splunk Expert Sessions Whether you are refining your security posture or ...