Dashboards & Visualizations

How to create a dashboard button that triggers a shell/python script with input?

ineedafleeb
Engager

Hey Guys

So I want to be able to create a button that has an input in it. I'm wondering if this is possible?

The idea is that you input an IP address and then it would go and tell your IPS/Firewall to block from this dashboard.

Thanks!

0 Karma
1 Solution

DavidHourani
Super Champion

Hi @ineedafleeb,

It is possible ! And quite simple if you can code a bit. All you have to do is build an advanced command, you can learn more about this here :
http://dev.splunk.com/view/python-sdk/SP-CAAAEU2

Instead of building a command that will run on the search results just build one that takes an IP as an input and then send it off to your IPS/Firewall to have the protocol, port or IP blocked.

Feel free to share your code once you're done if you need help reviewing or improving it.

Cheers,
David

View solution in original post

0 Karma

DavidHourani
Super Champion

Hi @ineedafleeb,

It is possible ! And quite simple if you can code a bit. All you have to do is build an advanced command, you can learn more about this here :
http://dev.splunk.com/view/python-sdk/SP-CAAAEU2

Instead of building a command that will run on the search results just build one that takes an IP as an input and then send it off to your IPS/Firewall to have the protocol, port or IP blocked.

Feel free to share your code once you're done if you need help reviewing or improving it.

Cheers,
David

0 Karma
Get Updates on the Splunk Community!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Get the T-shirt to Prove You Survived Splunk University Bootcamp

As if Splunk University, in Las Vegas, in-person, with three days of bootcamps and labs weren’t enough, now ...

Wondering How to Build Resiliency in the Cloud?

IT leaders are choosing Splunk Cloud as an ideal cloud transformation platform to drive business resilience,  ...