Dashboards & Visualizations

Use python to build XML dashboard?

DaleFRice
Explorer

As part of a project we're working on, we want to define a dashboard in advanced XML based on user input (the built in dashboard tools don't meet our needs, unfortunately, we need the dashboard to have some special behaviors and conform to a specific template). Ultimately, we want to have an app that lets the user define one of these dashboards themselves from a form, rather than building them by hand, but that's where we've run into a bit of a problem. We've been looking at creating a python command that will take the form data and build the XML dashboard on the server side, but I'm having trouble finding documentation on that aside from the commands.conf documentation.

So I have two questions. First, is it possible to call a python script on the serverside from the client and pass inputs to it? Secondly, is there any documentation on this aside from the commands.conf documentation?

Tags (2)
0 Karma
1 Solution

LukeMurphey
Champion

You should be able to do this with a custom controller. Basically, a custom controller will allow you to expose a URL that is accessible within SplunkWeb and passes control to your Python code to do the work.

View solution in original post

LukeMurphey
Champion

You should be able to do this with a custom controller. Basically, a custom controller will allow you to expose a URL that is accessible within SplunkWeb and passes control to your Python code to do the work.

DaleFRice
Explorer

I can't believe I missed that going through the tutorial. That's exactly what I was trying to do, thank you.

0 Karma

ianshefferman
Explorer

Unfortunately I don't believe there is a way to do this, but I certainly wish there was. I'm in the process of handling something like this by creating a sort of generic view/dashboard with advanced XML and using Javascript to, when necessary, load an iframe containing a small Python web app supplemented with information from the dashboard. This is actually quite easy to do, especially if you have experience doing web dev with Python, but it means you can't stick with just the Splunk interface.

Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

How to find the worst searches in your Splunk environment and how to fix them

Everyone knows Splunk is a powerful platform for running searches and doing data analytics. Your ...

Share Your Feedback: On Admin Config Service (ACS)!

Help Us Build a Better Admin Config Service Experience (ACS)   We Want Your Feedback on Admin Config Service ...

Build the Future of Agentic AI: Join the Splunk Agentic Ops Hackathon

AI is changing how teams investigate incidents, detect threats, automate workflows, and build intelligent ...