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!

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 ...