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!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...