Dashboards & Visualizations

How to run a dashboard from command line?

marksheinbaum
Explorer

I've been able to run a dashboard from the command line by 

1. copy and pasting simple xml into a file

2. updating tokens with desired values

3. running the pdf render command from curl, e.g., curl  -sku guest:pwd "https://splunkhost:8089/services/pdfgen/render" --data-urlencode "input-dashboard-xml=$(cat sample-dashboard.xml)" -d namespace=search -d paper-size=a4-landscape > mydash.pdf

Is there a way to use python/rest to do the same? I tried some of the endpoints and it creates the dashboard xml with extra scaffolding. Seems to be intended for adding and updating dashboards rather than running the dashboard itself.

Labels (1)
0 Karma

marksheinbaum
Explorer

I understand your point. However, the curl command with the edited dashboard XML allows some automation. Since I can download the XML using scp from the dashboard directory, edit the dashboard's XML, and run the .../pdfgen/render, I suppose I have a hack work around.

0 Karma

richgalloway
SplunkTrust
SplunkTrust

Dashboards come with JavaScript and other bits used by a web browser to render the dashboard for users to view.  They're not intended for consumption by automation.

---
If this reply helps you, Karma would be appreciated.
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!

Tech Talk Recap | Mastering Threat Hunting

Mastering Threat HuntingDive into the world of threat hunting, exploring the key differences between ...

Observability for AI Applications: Troubleshooting Latency

If you’re working with proprietary company data, you’re probably going to have a locally hosted LLM or many ...

Splunk AI Assistant for SPL vs. ChatGPT: Which One is Better?

In the age of AI, every tool promises to make our lives easier. From summarizing content to writing code, ...