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!

Detecting Remote Code Executions With the Splunk Threat Research Team

REGISTER NOWRemote code execution (RCE) vulnerabilities pose a significant risk to organizations. If ...

Observability | Use Synthetic Monitoring for Website Metadata Verification

If you are on Splunk Observability Cloud, you may already have Synthetic Monitoringin your observability ...

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...