<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to modify the timerange token in drilldown? in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-modify-the-timerange-token-in-drilldown/m-p/286964#M18166</link>
    <description>&lt;P&gt;You would need to use &lt;STRONG&gt;eval&lt;/STRONG&gt; tags for your calculations using &lt;STRONG&gt;relative_time&lt;/STRONG&gt; SPL function.&lt;/P&gt;

&lt;P&gt;Either on current dashboard or your link workload_drilldown you would need to have time tokens earliest and latest (these are default fields if you have not created your own explicit time token). I have created a sample for for one of the scenarios so that you can use the eval tokens as per your needs. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;    &amp;lt;drilldown&amp;gt;
      &amp;lt;eval token="EarliestTime"&amp;gt;relative_time($click.value$,"-10m")&amp;lt;/eval&amp;gt;
      &amp;lt;eval token="LatestTime"&amp;gt;relative_time($click.value$,"+5m")&amp;lt;/eval&amp;gt;
      &amp;lt;link&amp;gt;
            workload_drilldown?earliest=$EarliestTime$&amp;amp;latest=$LatestTime$
      &amp;lt;/link&amp;gt;
    &amp;lt;/drilldown&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 22 Dec 2016 16:52:12 GMT</pubDate>
    <dc:creator>niketn</dc:creator>
    <dc:date>2016-12-22T16:52:12Z</dc:date>
    <item>
      <title>How to modify the timerange token in drilldown?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-modify-the-timerange-token-in-drilldown/m-p/286962#M18164</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I have this timechart. I want to drill down to another search with a timerange starting 10 minutes before the moment in the timechart (which I can pass to the drilldown search as token using "$click.value$) and ending 5 minutes later.&lt;/P&gt;

&lt;P&gt;I tried to calculate the time in the search string of the drilldown as "earliest=timestamp-600, that does not work. &lt;/P&gt;

&lt;P&gt;Here is the table for the timechart. When clicking on the first element I want the drilldown from 14:20 until 14:35&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;2016-12-21 14:30:00     493.293571  800     567
2016-12-21 14:45:00     472.051973  800     560
2016-12-21 15:00:00     512.801327  800     552
2016-12-21 15:15:00     430.072523  800     537
2016-12-21 15:30:00     380.293680  800     523
2016-12-21 15:45:00     304.686207  800     510
2016-12-21 16:00:00     260.215492  800     492
2016-12-21 16:15:00     239.603977  800     468
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The drilldown in the chart:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;drilldown target="blank"&amp;gt;
        &amp;lt;link&amp;gt;workload_drilldown?timestamp=$click.value$&amp;lt;/link&amp;gt;
&amp;lt;/drilldown&amp;gt;      
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Timestamp is passed to the drilldown:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;workload_drilldown?timestamp=1482412500.000
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;In the target I can use the token like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;latest=$timestamp$
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;What I would like is something like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;earliest=$timestamp$-600 latest=$timestamp$+300
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Any ideas?&lt;/P&gt;</description>
      <pubDate>Thu, 22 Dec 2016 13:49:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-modify-the-timerange-token-in-drilldown/m-p/286962#M18164</guid>
      <dc:creator>Hoekb03</dc:creator>
      <dc:date>2016-12-22T13:49:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to modify the timerange token in drilldown?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-modify-the-timerange-token-in-drilldown/m-p/286963#M18165</link>
      <description>&lt;P&gt;See if something like this works&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;drilldown target="blank"&amp;gt;
  &amp;lt;eval token="e"&amp;gt;$click.value$-600&amp;lt;/eval&amp;gt;
  &amp;lt;eval token="l"&amp;gt;$click.value$-300&amp;lt;/eval&amp;gt;
  &amp;lt;link&amp;gt;workload_drilldown?earliest=$e$&amp;amp;latest=$l$&amp;lt;/link&amp;gt;
&amp;lt;/drilldown&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 22 Dec 2016 16:44:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-modify-the-timerange-token-in-drilldown/m-p/286963#M18165</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-12-22T16:44:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to modify the timerange token in drilldown?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-modify-the-timerange-token-in-drilldown/m-p/286964#M18166</link>
      <description>&lt;P&gt;You would need to use &lt;STRONG&gt;eval&lt;/STRONG&gt; tags for your calculations using &lt;STRONG&gt;relative_time&lt;/STRONG&gt; SPL function.&lt;/P&gt;

&lt;P&gt;Either on current dashboard or your link workload_drilldown you would need to have time tokens earliest and latest (these are default fields if you have not created your own explicit time token). I have created a sample for for one of the scenarios so that you can use the eval tokens as per your needs. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;    &amp;lt;drilldown&amp;gt;
      &amp;lt;eval token="EarliestTime"&amp;gt;relative_time($click.value$,"-10m")&amp;lt;/eval&amp;gt;
      &amp;lt;eval token="LatestTime"&amp;gt;relative_time($click.value$,"+5m")&amp;lt;/eval&amp;gt;
      &amp;lt;link&amp;gt;
            workload_drilldown?earliest=$EarliestTime$&amp;amp;latest=$LatestTime$
      &amp;lt;/link&amp;gt;
    &amp;lt;/drilldown&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 22 Dec 2016 16:52:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-modify-the-timerange-token-in-drilldown/m-p/286964#M18166</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2016-12-22T16:52:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to modify the timerange token in drilldown?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-modify-the-timerange-token-in-drilldown/m-p/286965#M18167</link>
      <description>&lt;P&gt;Both answers are basically the same. The good news: it works! Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 23 Dec 2016 08:01:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-modify-the-timerange-token-in-drilldown/m-p/286965#M18167</guid>
      <dc:creator>Hoekb03</dc:creator>
      <dc:date>2016-12-23T08:01:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to modify the timerange token in drilldown?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-modify-the-timerange-token-in-drilldown/m-p/286966#M18168</link>
      <description>&lt;P&gt;Had to use CDATA around the link to get the XML right but it works fine. Thanx!&lt;/P&gt;</description>
      <pubDate>Fri, 23 Dec 2016 08:06:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-modify-the-timerange-token-in-drilldown/m-p/286966#M18168</guid>
      <dc:creator>Hoekb03</dc:creator>
      <dc:date>2016-12-23T08:06:47Z</dc:date>
    </item>
  </channel>
</rss>

