Dashboards & Visualizations

Can I call a Python script from a dashboard and output its result in a panel?

alonsocaio
Contributor

Is it possible to call a Python or Shell script from a search/dashboard and output its result in a dashboard panel?

As an example, I'd like to run some whois script and show those information in my dashboard. Since this is just one of many other scripts I wanna try to run, I'd appreciate if you do not suggest to use any app or add-on from splunk base to do the whois search.

The scripts would be located inside "/etc/apps/APP_NAME/bin/", following the documentation.

0 Karma
1 Solution

kamlesh_vaghela
SplunkTrust
SplunkTrust

@alonsocaio

You can call Splunk Custom Endpoint to execute a script in bin folder.

1) create an endpoint
2) create a javascript to call endpoint
3) include javascript in your the dashbaord, call rest endpoint and display response in the dashboard.

Please check below links for implementation.

https://www.hurricanelabs.com/splunk-tutorials/splunk-custom-endpoints-part-1-the-basics
https://www.hurricanelabs.com/splunk-tutorials/splunk-custom-endpoints-part-2-cleaning-the-data
https://www.hurricanelabs.com/splunk-tutorials/splunk-custom-endpoints-part-3-posting-the-data
https://www.hurricanelabs.com/splunk-tutorials/splunk-custom-endpoints-part-4-getting-the-data

Thanks

View solution in original post

kamlesh_vaghela
SplunkTrust
SplunkTrust

@alonsocaio

You can call Splunk Custom Endpoint to execute a script in bin folder.

1) create an endpoint
2) create a javascript to call endpoint
3) include javascript in your the dashbaord, call rest endpoint and display response in the dashboard.

Please check below links for implementation.

https://www.hurricanelabs.com/splunk-tutorials/splunk-custom-endpoints-part-1-the-basics
https://www.hurricanelabs.com/splunk-tutorials/splunk-custom-endpoints-part-2-cleaning-the-data
https://www.hurricanelabs.com/splunk-tutorials/splunk-custom-endpoints-part-3-posting-the-data
https://www.hurricanelabs.com/splunk-tutorials/splunk-custom-endpoints-part-4-getting-the-data

Thanks

pruthvikrishnap
Contributor
0 Karma
Get Updates on the Splunk Community!

What You Read The Most: Splunk Lantern’s Most Popular Articles!

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

See your relevant APM services, dashboards, and alerts in one place with the updated ...

As a Splunk Observability user, you have a lot of data you have to manage, prioritize, and troubleshoot on a ...

Index This | What goes away as soon as you talk about it?

May 2025 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with this month’s ...