Other Usage

How can I define to time range in panel without timerange picker?

GioCortez
Explorer

Hello. I'm creating a dashboard which will then be used as a monthly report, with some statistics in it. I will use pdf delivery, so that i have avoided using any timerange picker in it.

Point is, without timerange picker, how can i define to run the search for -30d@d until -1d@d in all my panels?

Labels (1)
0 Karma

GioCortez
Explorer

Works fine for the dashboard itself, but when i try "Schedule PDF" it tells me "Invalid earliest_time" on the PDF. 

I'm running crazy. i'm ok having no forms/inputs on a to-be-scheduled dashboard, but where/how should i define the time range it shall run for?

0 Karma

richgalloway
SplunkTrust
SplunkTrust

It sounds like the <init> element is not being processed.  Have you tried hardcoding the <earliest> and <latest> elements in each panel to "-30d@d" and "-1d@d", respectively?  If that fails then you might try adding earliest=-30d@d latest=-1d@d to each query.

---
If this reply helps you, Karma would be appreciated.
0 Karma

richgalloway
SplunkTrust
SplunkTrust

You can create tokens for earliest and latest without a time picker by using an <init> element.

<init>
  <set name="start">-30d@d</set>
  <set name="end">-1d@d</set>
</init>

Then use the tokens in your <search> elements.

<search>
  <query>... </query>
  <earliest>$start$</earliest>
  <latest>$end$</latest>
</search>
---
If this reply helps you, Karma would be appreciated.
Get Updates on the Splunk Community!

A Guide To Cloud Migration Success

As enterprises’ rapid expansion to the cloud continues, IT leaders are continuously looking for ways to focus ...

Join Us for Splunk University and Get Your Bootcamp Game On!

If you know, you know! Splunk University is the vibe this summer so register today for bootcamps galore ...

.conf24 | Learning Tracks for Security, Observability, Platform, and Developers!

.conf24 is taking place at The Venetian in Las Vegas from June 11 - 14. Continue reading to learn about the ...