Dashboards & Visualizations

Time range picker doesn't work in dashboard

snigdhasaxena
Communicator

I have added time range picker in dashboard and set autorun= true
but when I change time range in my dashboard it doesn't rerun and populate the dashboard.

Code sample

test Data

<input type="time" token="Time Range Picker" searchWhenChanged="true">
  <label>Select time</label>
  <default>
    <earliest>-24h@h</earliest>
    <latest>now</latest>
  </default>
</input>
0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi snigdhasaxena,
at first, I suggest to not use spaces in token's names, so use (e.g.) in input section:

 <input type="time" token="Time" searchWhenChanged="true">
   <label>Select time</label>
   <default>
     <earliest>-24h@h</earliest>
     <latest>now</latest>
   </default>
 </input>

Then in panels use :

<search>
   <query> my_search </query>
   <earliest>$Time.earliest$</earliest>
   <latest>$Time.latest$</latest>
</search>

Bye.
Giuseppe

kamlesh_vaghela
SplunkTrust
SplunkTrust

@snigdhasaxena

Here I'm assuming that you have used timerange picker in panel searches. Like

 <search>
          <query> MY SEARCH </query>
          <earliest>$earliest$</earliest>
          <latest>$latest$</latest>
        </search>

Still can you please share full dashboard XML? MAke sure you mask confidential values with a dummy value.

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...