Dashboards & Visualizations

Example of calling a bashscript from a dashboard?

dpwtheitguy
Loves-to-Learn Lots

All, 

I have a simple bash script which pulls down some data from git and restarts a service. I'd like to give a button to my SOC on a Splunk dashboard that they can just click. I can put the script anywhere really. I remember seeing that if I should be able to execute script from splunk/bin from dashboards but I having a hard time finding an example. 

Someone have an example/recipe they can point me to? 

 

Labels (1)
Tags (2)
0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @dpwtheitguy,

in Splunk you can automatically run your script as alert action.

To run a script using a button, you have to create a JavaScript that runs your bashscript, associate it to an html button and insert the JavaScript in the first row of the dashboard

<form version="1.1" script="yourscript.js">

 Ciao.

Giuseppe

0 Karma
Get Updates on the Splunk Community!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...