<?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: Dashboard timechart time tokens not working in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Dashboard-timechart-time-tokens-not-working/m-p/572051#M46966</link>
    <description>&lt;P&gt;If I have the first block set, and then attempt to drilldown, the result is an error:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;Invalid earliest_time.&lt;/LI-CODE&gt;&lt;P&gt;For the 2nd link block, I get this error:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=app host=... sourcetype="..." status!=200 (earliest=NaN latest&amp;lt;=NaN)
Invalid value "NaN" for time term 'earliest'
The search job has failed due to an error. You may be able view the job in the Job Inspector.&lt;/LI-CODE&gt;&lt;P&gt;And just to confirm, my drilldown bock looks like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;        &amp;lt;drilldown&amp;gt;
          &amp;lt;eval token="drilldown.earliest"&amp;gt;strptime($row.Time$,"%m-%d-%Y %H:%M:%S")&amp;lt;/eval&amp;gt;
          &amp;lt;eval token="drilldown.latest"&amp;gt;strptime($row.Time$,"%m-%d-%Y %H:%M:%S") + 3600&amp;lt;/eval&amp;gt;
          &amp;lt;link target="_blank"&amp;gt;search?q=index%3Dapp%20host%3D...%20sourcetype%3D%22...%22%20status!%3D200%20(earliest%3D$drilldown.earliest$%20latest%3C%3D$drilldown.latest$)&amp;lt;/link&amp;gt;
        &amp;lt;/drilldown&amp;gt;&lt;/LI-CODE&gt;</description>
    <pubDate>Fri, 22 Oct 2021 16:55:11 GMT</pubDate>
    <dc:creator>MarcusAtMARS</dc:creator>
    <dc:date>2021-10-22T16:55:11Z</dc:date>
    <item>
      <title>Dashboard timechart time tokens not working</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Dashboard-timechart-time-tokens-not-working/m-p/570244#M46847</link>
      <description>&lt;P&gt;I have a dashboard that has a timechart displaying a count of values occurring every hour. My query is:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;index=app host=... sourcetype="..." siteType=...
| timechart span=1h count(eval(status!=200)) as Fails
| eval Time = strftime(_time, "%Y-%d-%m %H:%M:%S") | fields - _time
| table Time, Fails&lt;/LI-CODE&gt;&lt;P&gt;This works perfectly, but I want to add a drilldown on my table so the user can click on a row and see all the values for that hour. The closest thing I have been able to come up with is this query:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=app host=... sourcetype="..." siteType=... status!=200 ((earliest=$earliest$ latest&amp;lt;$latest$))&lt;/LI-CODE&gt;&lt;P&gt;But if I click on a row, it gives me a search that looks like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=app host=... sourcetype="..." siteType=... status!=200 ((earliest=1633096800 latest&amp;lt;1633702712))&lt;/LI-CODE&gt;&lt;P&gt;And I have an error in the search, "&lt;SPAN&gt;Invalid earliest_time.&lt;/SPAN&gt;"&lt;/P&gt;&lt;P&gt;What is going on here? Is there a conversion I need to do on the earliest and latest tokens to get the correct time?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Oct 2021 14:42:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Dashboard-timechart-time-tokens-not-working/m-p/570244#M46847</guid>
      <dc:creator>MarcusAtMARS</dc:creator>
      <dc:date>2021-10-08T14:42:21Z</dc:date>
    </item>
    <item>
      <title>Re: Dashboard timechart time tokens not working</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Dashboard-timechart-time-tokens-not-working/m-p/570286#M46848</link>
      <description>&lt;P&gt;Try method from this (change $row._time$ with $row.Time$. For latest, add 3600)&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.splunk.com/t5/Splunk-Search/Drilldown-pass-the-earliest-and-latest-from-a-timechart/td-p/337915" target="_blank"&gt;https://community.splunk.com/t5/Splunk-Search/Drilldown-pass-the-earliest-and-latest-from-a-timechart/td-p/337915&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Oct 2021 19:05:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Dashboard-timechart-time-tokens-not-working/m-p/570286#M46848</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2021-10-08T19:05:38Z</dc:date>
    </item>
    <item>
      <title>Re: Dashboard timechart time tokens not working</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Dashboard-timechart-time-tokens-not-working/m-p/570301#M46854</link>
      <description>&lt;P&gt;Thanks for the response! I edited my XML to be the following:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;drilldown&amp;gt;
    &amp;lt;eval token="drilldown.earliest"&amp;gt;strptime($row.Time$,"%Y-%m-%d %H:%M:%S")&amp;lt;/eval&amp;gt;
    &amp;lt;eval token="drilldown.latest"&amp;gt;strptime($row.Time$,"%Y-%m-%d %H:%M:%S") + 3600&amp;lt;/eval&amp;gt;
    &amp;lt;link target="_blank"&amp;gt;search?q=index%3Dapp%20host%3D...%20sourcetype%3D%...%22%20siteType%...%20status!%3D200%20((earliest%3D$drilldown.earliest$%20latest%3C%3D$drilldown.latest$))&amp;amp;amp;earliest=$$drilldown.earliest$$&amp;amp;amp;latest=$$drilldown.latest$$&amp;lt;/link&amp;gt;
&amp;lt;/drilldown&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;Put clicking a row to drill down still gives my a query looking like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=app host=... sourcetype="..." siteType=... status!=200 ((earliest=1620658800 latest&amp;lt;=1620662400))&lt;/LI-CODE&gt;&lt;P&gt;And the error:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Invalid earliest_time&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 08 Oct 2021 21:27:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Dashboard-timechart-time-tokens-not-working/m-p/570301#M46854</guid>
      <dc:creator>MarcusAtMARS</dc:creator>
      <dc:date>2021-10-08T21:27:42Z</dc:date>
    </item>
    <item>
      <title>Re: Dashboard timechart time tokens not working</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Dashboard-timechart-time-tokens-not-working/m-p/571898#M46940</link>
      <description>&lt;P&gt;Help!&lt;/P&gt;</description>
      <pubDate>Thu, 21 Oct 2021 19:45:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Dashboard-timechart-time-tokens-not-working/m-p/571898#M46940</guid>
      <dc:creator>MarcusAtMARS</dc:creator>
      <dc:date>2021-10-21T19:45:17Z</dc:date>
    </item>
    <item>
      <title>Re: Dashboard timechart time tokens not working</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Dashboard-timechart-time-tokens-not-working/m-p/571916#M46945</link>
      <description>&lt;P&gt;Can you try with following drilldown &amp;lt;link&amp;gt; block?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;link target="_blank"&amp;gt;search?q=index%3Dapp%20host%3D...%20sourcetype%3D%...%22%20siteType%...%20status!%3D200%20&amp;amp;amp;earliest=$$drilldown.earliest$$&amp;amp;amp;latest=$$drilldown.latest$$&amp;lt;/link&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;OR&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;link target="_blank"&amp;gt;search?q=index%3Dapp%20host%3D...%20sourcetype%3D%...%22%20siteType%...%20status!%3D200%20(earliest%3D$drilldown.earliest$%20latest%3C%3D$drilldown.latest$)&amp;lt;/link&amp;gt;&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 21 Oct 2021 21:30:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Dashboard-timechart-time-tokens-not-working/m-p/571916#M46945</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2021-10-21T21:30:31Z</dc:date>
    </item>
    <item>
      <title>Re: Dashboard timechart time tokens not working</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Dashboard-timechart-time-tokens-not-working/m-p/572051#M46966</link>
      <description>&lt;P&gt;If I have the first block set, and then attempt to drilldown, the result is an error:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;Invalid earliest_time.&lt;/LI-CODE&gt;&lt;P&gt;For the 2nd link block, I get this error:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=app host=... sourcetype="..." status!=200 (earliest=NaN latest&amp;lt;=NaN)
Invalid value "NaN" for time term 'earliest'
The search job has failed due to an error. You may be able view the job in the Job Inspector.&lt;/LI-CODE&gt;&lt;P&gt;And just to confirm, my drilldown bock looks like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;        &amp;lt;drilldown&amp;gt;
          &amp;lt;eval token="drilldown.earliest"&amp;gt;strptime($row.Time$,"%m-%d-%Y %H:%M:%S")&amp;lt;/eval&amp;gt;
          &amp;lt;eval token="drilldown.latest"&amp;gt;strptime($row.Time$,"%m-%d-%Y %H:%M:%S") + 3600&amp;lt;/eval&amp;gt;
          &amp;lt;link target="_blank"&amp;gt;search?q=index%3Dapp%20host%3D...%20sourcetype%3D%22...%22%20status!%3D200%20(earliest%3D$drilldown.earliest$%20latest%3C%3D$drilldown.latest$)&amp;lt;/link&amp;gt;
        &amp;lt;/drilldown&amp;gt;&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 22 Oct 2021 16:55:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Dashboard-timechart-time-tokens-not-working/m-p/572051#M46966</guid>
      <dc:creator>MarcusAtMARS</dc:creator>
      <dc:date>2021-10-22T16:55:11Z</dc:date>
    </item>
    <item>
      <title>Re: Dashboard timechart time tokens not working</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Dashboard-timechart-time-tokens-not-working/m-p/572052#M46967</link>
      <description>&lt;P class="lia-align-justify"&gt;Looks like the 2nd query worked, but I hade to make sure the Time variable in my initial query was "%m-%d-%Y %H:%M:%S". Thanks for your help,&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/15147"&gt;@somesoni2&lt;/a&gt;&amp;nbsp;!&lt;/P&gt;</description>
      <pubDate>Fri, 22 Oct 2021 16:58:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Dashboard-timechart-time-tokens-not-working/m-p/572052#M46967</guid>
      <dc:creator>MarcusAtMARS</dc:creator>
      <dc:date>2021-10-22T16:58:18Z</dc:date>
    </item>
  </channel>
</rss>

