Splunk Search

View events changes timeframe

shayhibah
Path Finder

I have dashboards with drill down option.
The drill down query contains custom earliest and latest tokens since there was an issue with the time frame.

<link>....|rename "0" as "High" "1" as "Critical" | table _time,"Critical","High"&amp;earliest=$clicked_earliest_date$&amp;latest=$clicked_latest_date$</link>

After drilling down, the time frame is correct (based on the clicked event time value):
** 158 events (9/14/18 12:00:00.000 AM to 9/15/18 12:00:00.000 AM) **

But, when click on the results and choose "view events", the time frame is changed to its old value (which was wrong - 1 ms instead of 2 days).
0 events (9/14/18 12:00:00.000 AM to 9/14/18 12:00:00.001 AM)

How can I fix it?

Tags (1)
0 Karma

harsmarvania57
Ultra Champion

Which is your splunk version and it will be good if you post your Dashboard XML code (Mask any sensitive data) ?

For me it is working fine in Splunk 7.1.2with below test Dashboard XML

<form>
  <label>dashboard test 1</label>
  <row>
    <panel>
      <input type="time" token="time_tok" searchWhenChanged="true">
        <label></label>
        <default>
          <earliest>-15m</earliest>
          <latest>now</latest>
        </default>
      </input>
      <table>
        <search>
          <query>index=_internal | head 10 | stats count by host</query>
          <earliest>$time_tok.earliest$</earliest>
          <latest>$time_tok.latest$</latest>
        </search>
        <option name="count">10</option>
        <option name="drilldown">cell</option>
        <drilldown>
          <link target="_blank">search?q=index=_internal host=$row.host$ bytes=* | table bytes&amp;earliest=$time_tok.earliest$&amp;latest=$time_tok.latest$</link>
        </drilldown>
      </table>
    </panel>
  </row>
</form>
0 Karma

shayhibah
Path Finder

Any expert?

0 Karma

Vijeta
Influencer

Try form.earliest =$clicked_earliest_date$&form.latest=$clicked_latest_date$ in your link tag

0 Karma

shayhibah
Path Finder

hi @Vijeta

Unfortunately it does not work.
After drill down the first time, I clicked on the cell in the table and before clicking on view events, I noticed that in this small picker, the timeframe is wrong and not the same as the search bar.

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Thanks for the Memories! Splunk University, .conf25, and our Community

Thank you to everyone in the Splunk Community who joined us for .conf25, which kicked off with our iconic ...

Data Persistence in the OpenTelemetry Collector

This blog post is part of an ongoing series on OpenTelemetry. What happens if the OpenTelemetry collector ...

Introducing Splunk 10.0: Smarter, Faster, and More Powerful Than Ever

Now On Demand Whether you're managing complex deployments or looking to future-proof your data ...