Dashboards & Visualizations

How to integrate HTML Splunk Dashboard with Python Script?

PriyaGopathy
New Member

Hi,

On Click of Button in HTML Splunk dashboard,
I need to pass start date and end date as a input parameter to custom python script in the Linux server.
path to the script: /opt/splunk/etc/apps/search/bin/

  • What package needs to import in python script?
  • Object name to get the date value from splunk?

If possible, please share with us the steps / procedure to do the above scenario.

Thanks in advance.

Tags (3)
0 Karma

kamlesh_vaghela
SplunkTrust
SplunkTrust

@PriyaGopathy

I suggest the following approach.

1) Create a custom endpoint in Splunk which will call python script in search/bin/ using subprocess module.
2) Create a function which will call a custom endpoint.
3) Call javascript function on click of the HTML button.

Ref:https://www.hurricanelabs.com/splunk-tutorials/splunk-custom-endpoints-part-1-the-basics

0 Karma

PriyaGopathy
New Member

@ kamlesh_vaghela

Thanks for the update. I ll try and let you know.
Meanwhile, do you have any working sample?

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Observe and Secure All Apps with Splunk

 Join Us for Our Next Tech Talk: Observe and Secure All Apps with SplunkAs organizations continue to innovate ...

What's New in Splunk Observability - August 2025

What's New We are excited to announce the latest enhancements to Splunk Observability Cloud as well as what is ...

Introduction to Splunk AI

How are you using AI in Splunk? Whether you see AI as a threat or opportunity, AI is here to stay. Lucky for ...