Dashboards & Visualizations

Unable to render Dashboard to PDF with REST API

Ethil
Path Finder

Hello everyone, and thanks in advance for your help. I'm very new to this subject so if anything is unclear, i'll try to explain my problem more in details.

I'm using spunk 9.2.1, and i'm trying to generate a PDF from one of my dashboard, using a splunk API call. From what i saw online, i should use :

GET /services/pdfgen/render?input-dashboard=<DashboardName>&namespace=<AppName>&paper-size=a4-landscape

 

 

user = MyUser; app = MyApp; dashboard = Security_events_dashboard

(i'm using a module that calls the API for me, all i do is precise the endpoint and the parameters and it gives me the response as a string)

The problem is that i get this error :

 

Unable to render PDF.<br/><ul><il>Bailing out of Integrated PDF Generation. Exception raised while preparing to render "Untitled" to PDF. [HTTP 404] https://localhost:8089/servicesNS/MyUser/MyApp/data/ui/views/Security_events_dashboard; [{'type': 'ERROR', 'code': None, 'text': 'Could not find object id=Security_events_dashboard'}]</li></ul>

 

 

On th GUI, signed as MyUser, i can see the dashboard under MyApp, and the permission is set to read for MyUser, Owner = nobody, Sharing = App. To confirm this, on my Search-Head VM i can see the dashboard under $SPLUNK_HOME/etc/apps/MyApp/default/data/ui/views/security_events_dashboard.xml. Plus in $SPLUNK_HOME/etc/apps/MyApp/metadata/default.meta :

 

[views/security_events_dashboard.xml]
access = read : [MyUser], write : [admin]
owner = nobody
version = 9.1.0.1
export = system

 

 

I've tried using the dashboard name as security_events_dashboard (instead of Security_events_dashboard) but i get the same error.

I don't see what i'm missing here, si if anyone could give me hint or two please,

thank you

Labels (1)
0 Karma
1 Solution

Ethil
Path Finder

Yeah i know the problem was quite specific, sorry for the late answer and thanks for your help. I was able to determine what failed, the GET was actually supposed to be a POST request. I don't really know why but one splunk error message said that the GET is outdated for pdfgen. Anyway thanks again.

View solution in original post

0 Karma

bowesmana
SplunkTrust
SplunkTrust

I can't answer your specific question other than to ask if you have inputs or tokens, which are discussed from other users who have similar questions.

However, there is a relatively new app

https://splunkbase.splunk.com/app/7171

which may be of interest, as it will give you more control over the output.

 

Ethil
Path Finder

Yeah i know the problem was quite specific, sorry for the late answer and thanks for your help. I was able to determine what failed, the GET was actually supposed to be a POST request. I don't really know why but one splunk error message said that the GET is outdated for pdfgen. Anyway thanks again.

0 Karma
Get Updates on the Splunk Community!

Splunk Observability as Code: From Zero to Dashboard

For the details on what Self-Service Observability and Observability as Code is, we have some awesome content ...

[Puzzles] Solve, Learn, Repeat: Character substitutions with Regular Expressions

This challenge was first posted on Slack #puzzles channelFor BORE at .conf23, we had a puzzle question which ...

Shape the Future of Splunk: Join the Product Research Lab!

Join the Splunk Product Research Lab and connect with us in the Slack channel #product-research-lab to get ...