Dashboards & Visualizations

How to trigger a backend script via Splunk UI submit button?

koshyk
Super Champion

We have a requirement to trigger a script based on a submit button (eg from the Splunk UI examples, our end-user requires a shell script to be run). Is it easy to do or require SDK's etc? (I feel its more like an ajax request to trigger a server-side script)

Can we do differently/quickly via Splunk UI to trigger a backend script from the UI element?

Added more details as per feedback
- Customer wants to trigger backend script(s) with values fetched from a Splunk UI form i.e. user captured values. The form will collect user input and the submit button should pass the values to a backend script (same as a normal ajax call request to server-side script)
- The backend script is a shell script which will run certain actions like loading up a control-m job or something.
- The backend script exists in a standalone SH
- The backend script currently exists of itself, but we can put into an app/bin if required

dwaddle
SplunkTrust
SplunkTrust

Vague question is slightly vague. But, there are some ways you can do it.

  1. The ... | script search command. http://docs.splunk.com/Documentation/Splunk/6.5.2/SearchReference/script
  2. A custom search command. http://dev.splunk.com/view/python-sdk/SP-CAAAEU2
  3. A custom REST API endpoint that runs your script

I think more information is needed to be able to provide more useful advice.

rjthibod
Champion

Can you share some more details?

Does it need to be the Submit button on top of the dashboard or elsewhere on the dashboard?

Where is the script running? Is it on the search head or some other remote server? Is the script installed as part of a Splunk app or something else?

Get Updates on the Splunk Community!

Splunk Classroom Chronicles: Training Tales and Testimonials (Episode 4)

Welcome back to Splunk Classroom Chronicles, our ongoing series where we shine a light on what really happens ...

From GPU to Application: Monitoring Cisco AI Infrastructure with Splunk Observability ...

AI workloads are different. They demand specialized infrastructure—powerful GPUs, enterprise-grade networking, ...

Application management with Targeted Application Install for Victoria Experience

  Experience a new era of flexibility in managing your Splunk Cloud Platform apps! With Targeted Application ...