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!

Unlock New Opportunities with Splunk Education: Explore Our Latest Courses!

At Splunk Education, we’re dedicated to providing top-tier learning experiences that cater to every skill ...

Technical Workshop Series: Splunk Data Management and SPL2 | Register here!

Hey, Splunk Community! Ready to take your data management skills to the next level? Join us for a 3-part ...

Spotting Financial Fraud in the Haystack: A Guide to Behavioral Analytics with Splunk

In today's digital financial ecosystem, security teams face an unprecedented challenge. The sheer volume of ...