Dashboards & Visualizations

Why is my dashboard query ignoring timepicker selected default values?

adityapavan18
Contributor
<form>
  <label>SYBASE TEST</label>
  <description></description>
  <searchTemplate><My Search></searchTemplate>
  <fieldset submitButton="true">
        <input type="time" token="field1"><label></label><default><earliestTime>-1d@d</earliestTime><latestTime>@d</latestTime></default></input></fieldset>
  <row>
        <panel>
            <table><searchPostProcess<My PostProcess 1></searchPostProcess><option name="wrap">true</option>
                <option name="rowNumbers">true</option>
                <option name="dataOverlayMode">none</option>
                <option name="drilldown">row</option>
                <option name="count">30</option>
                <drilldown>
                    <condition field="SERVER">
                        <set token="SERVER">$click.value$</set>
                    </condition>
                </drilldown>
            </table></panel>
        <panel>
            <table depends="$SERVER$">
                <title>SERVER BACKUP : $SERVER$</title>
                <searchPostProcess><My Post Process 2></searchPostProcess>
                <earliestTime>-1d@d</earliestTime><latestTime>@d</latestTime>
                <option name="wrap">true</option>
                <option name="rowNumbers">false</option>
                <option name="dataOverlayMode">none</option>
                <option name="drilldown">row</option>
                <option name="count">30</option>
            </table>
        </panel>
    </row>
</form>

Even though I have my timepicker defaulted to "Yesterday" data, when the search is executed, it is still considering "All Time" for search execution. Could someone help me with where I am doing it wrong??

Thanks
Aditya

0 Karma

jayannah
Builder

I see in your code you are using searchPostProcess, that mean you are have searchTemplate define (you haven't put in the question).

So for the searchTemplate, add following lines (As said bu chabfoli)
< earliestTime >$field1.earliest$< /earliestTime >
< latestTime >$field1.latest$< /latestTime >

Secondly, remove the < earliest > and < latest > tags for the searchPostProcess (which are just below searchPostProcess line in your example.. i.e line #24 as indicated).

0 Karma

chanfoli
Builder

Hello, to get the picker time, try adding the following inside the each element with a search or search post process:

<earliestTime>$field1.earliest$</earliestTime>
<latestTime>$field1.latest$</latestTime>
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 ...