Dashboards & Visualizations

How to pass time range values in a drilldown?

sushmitha_mj
Communicator

Hi,

I am having trouble passing a time range value from the main form to the drilldown form . So when I click on each row i want the drill to show the transactions in that time range alone(15 min in this case)

Here is my main form query and drill down link

   <search>
      <query>index=ibd Service_Name=*|timechart span=15m count(Trans)   | eval _earliest = _time | eval _latest = _time + _span</query>
      <earliest>$TimeField.earliest$</earliest>
      <latest>$TimeField.latest$</latest>
    </search>

   <drilldown>
      <link>
        <![CDATA[/app/app_name/form_name?form._earliest=$row._earliest$&form._latest=$row._latest$]]>
        <option name="dataOverlayMode">none</option>
      </link>
    </drilldown>

On the drill down dashboard I have the following:

<input type="time" searchWhenChanged="true" token="TimeField">
  <label></label>
  <default>
    <earliest>$_earliest$</earliest>
     <latest>$_latest$</latest>
    </default>
</input>

To pass the value to the query, I simply used:

      <query>...|search </query>
      <earliest>$TimeField.earliest$</earliest>
      <latest>$TimeField.latest$</latest>

Since this did not work... I tried to pass the time value directly:

      <query>...|search </query>
      <earliest>$_earliest$</earliest>
      <latest>$_latest$</latest>

Both did not work. Can someone tell me what is wrong:

0 Karma
1 Solution

sundareshr
Legend

Try this

*Main Dashboard*

<search>
       <query>index=ibd Service_Name=*| timechart span=15m count(Trans) </query>
       <earliest>$TimeField.earliest$</earliest>
       <latest>$TimeField.latest$</latest>
     </search>
    <drilldown>
       <eval token="e">$click.value$</eval>
       <eval token="le">relative_time($click.value$, "+15m")</eval>
       <link>
         <![CDATA[/app/app_name/form_name?form._earliest=$e$&form._latest=$l$]]>
         <option name="dataOverlayMode">none</option>
       </link>
     </drilldown>

**** On drilldown dashboard****

 <input type="time" searchWhenChanged="true" token="TimeField">
   <label></label>
   <default>
     <earliest>$form._earliest$</earliest>
      <latest>$form._latest$</latest>
     </default>
 </input>

View solution in original post

sundareshr
Legend

Try this

*Main Dashboard*

<search>
       <query>index=ibd Service_Name=*| timechart span=15m count(Trans) </query>
       <earliest>$TimeField.earliest$</earliest>
       <latest>$TimeField.latest$</latest>
     </search>
    <drilldown>
       <eval token="e">$click.value$</eval>
       <eval token="le">relative_time($click.value$, "+15m")</eval>
       <link>
         <![CDATA[/app/app_name/form_name?form._earliest=$e$&form._latest=$l$]]>
         <option name="dataOverlayMode">none</option>
       </link>
     </drilldown>

**** On drilldown dashboard****

 <input type="time" searchWhenChanged="true" token="TimeField">
   <label></label>
   <default>
     <earliest>$form._earliest$</earliest>
      <latest>$form._latest$</latest>
     </default>
 </input>

james_n
Path Finder

hi @sundareshr , Its working fine for last 24 hours or Today, But if i select last 7 days its taking earliest as day starting and latest as day starting to 15 minutes like 00:15:00, Could you help on this.

0 Karma

sushmitha_mj
Communicator

It worked!! Awesome thanks

0 Karma
Get Updates on the Splunk Community!

Observability Unlocked: Kubernetes Monitoring with Splunk Observability Cloud

 Ready to master Kubernetes and cloud monitoring like the pros? Join Splunk’s Growth Engineering team for an ...

Update Your SOAR Apps for Python 3.13: What Community Developers Need to Know

To Community SOAR App Developers - we're reaching out with an important update regarding Python 3.9's ...

October Community Champions: A Shoutout to Our Contributors!

As October comes to a close, we want to take a moment to celebrate the people who make the Splunk Community ...