Dashboards & Visualizations

Why does my time picker $earliest_time$ export as "Invalid earliest_time" on a PDF report?

jofermin
Explorer

I'm using an API call to export dashboards. However, when I have a time token/time picker, $earliest_time$, then it outputs "Invalid earlist_time" on the pdf.

Here's the basic curl command I'm using:
curl -u admin:{{password}} -k 'https://localhost:8089/services/pdfgen/render?input-dashboard={{your_dashboard}}&namespace={{your_namespace}}&paper-size=a4-landscape' >> test.pdf

0 Karma

skoelpin
SplunkTrust
SplunkTrust

I had this same issue and solved it by making my dashboards compatible with relative time. If you're still facing this issue, I can post the code to make it relative time compatible

0 Karma

iamlucky92
Observer

Hi @skoelpin can you please advise how to proceed , i am also stuck with same.

0 Karma

niketn
Legend

@jofermin,

I dont think the issue is with curl. This is an existing limitation of PDF generation for dashboard. You can not generate PDF for forms, and if you are trying to pass on a token, then it means you are using form.

Refer to documentation: http://docs.splunk.com/Documentation/Splunk/latest/Viz/DashboardPDFs#Limitations_to_PDF_generation

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"

niketn
Legend

@jofermin, please let me know if this addresses your concern, so that I can convert to answer for you to accept and mark as answered.

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma

DalJeanis
SplunkTrust
SplunkTrust

Haven't looked into that curl call syntax, but it's complainin about having no value for a token, so I'd try adding the token value into the call sequence - > &earliest_time='whateverdate/time'

0 Karma

jofermin
Explorer

Yeah, I've been trying to add a "-1min" everywhere, but neither &earliest=1min or &token.earliest=-1min works

0 Karma

DalJeanis
SplunkTrust
SplunkTrust

1) Try these formats to verify whether it can work at all
&earliest="05/18/2017:00:00:00"
&token.earliest="05/18/2017:00:00:00"

2) if they work, then try "-1m"

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...