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!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...