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 2024 SplunkTrust!

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

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...