All Apps and Add-ons

Splunk Dashboard - timerange token doesn't work in dbxquery command

cheriemilk
Path Finder

Hi Team,

I have configured below token,

<row>
    <panel>
      <title>DB performance comparison for loading route map</title>
      <table>
        <title>DB performance comparison for loading route map</title>
        <search>
          <query> | dbxquery query="SELECT xx FROM xx  WHERE TIMESTAMP > add_days(now(),-$timerange_token$)"
         </query>
          <earliest>$timerange_token.earliest$</earliest>
          <latest>$timerange_token.latest$</latest>
          <sampleRatio>1</sampleRatio>
        </search>
        <option name="count">10</option>
        <option name="dataOverlayMode">heatmap</option>
        <option name="drilldown">none</option>
        <option name="percentagesRow">false</option>
        <option name="refresh.display">progressbar</option>
        <option name="rowNumbers">false</option>
        <option name="totalsRow">false</option>
        <option name="wrap">true</option>
      </table>
    </panel>
  </row>

But somehow , it doesn't work the panel is always display waiting for input when I select a time period from the shared time picker.
alt text

If I hard code the date , it works
dbxquery query="SELECT xx FROM xx WHERE TIMESTAMP > add_days(now(),-2)"

I set time range for this panel to "TimeRange: Shared Time Picker (timerange_token) "
alt text

0 Karma
Get Updates on the Splunk Community!

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...

Introducing Splunk Enterprise 9.2

WATCH HERE! Watch this Tech Talk to learn about the latest features and enhancements shipped in the new Splunk ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...