<?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 add timestamp in all dashboard panels in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-add-timestamp-in-all-dashboard-panels/m-p/420761#M27715</link>
    <description>&lt;P&gt;where would you like to have the time field, in the panel title or as a column / field in your panel? Both ways are possible&lt;/P&gt;</description>
    <pubDate>Thu, 01 Aug 2019 16:17:29 GMT</pubDate>
    <dc:creator>Sukisen1981</dc:creator>
    <dc:date>2019-08-01T16:17:29Z</dc:date>
    <item>
      <title>How to add timestamp in all dashboard panels</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-add-timestamp-in-all-dashboard-panels/m-p/420759#M27713</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;
I would like to add the time in my panels for my dashboard. I have written the below xml code for it. Do i need to change it.&lt;BR /&gt;
How to call the token for other panels. I have gone through the documents for couldn't able to find the soution.&lt;BR /&gt;
Anyone please help me on it.&lt;/P&gt;

&lt;P&gt;XML code:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  XXX

  1  
   2   
   3   
   4     
     5   &amp;lt;search&amp;gt;
     6     &amp;lt;query&amp;gt;| XXX&amp;lt;/query&amp;gt;
        7  &amp;lt;earliest&amp;gt;-5m&amp;lt;/earliest&amp;gt;
        8  &amp;lt;latest&amp;gt;now&amp;lt;/latest&amp;gt;
     9     &amp;lt;done&amp;gt;&amp;lt;eval token="lastUpdatedOn"&amp;gt; strftime(now(),"%m/%d/%Y %H:%M:%S") &amp;lt;/eval&amp;gt;&amp;lt;/done&amp;gt;
        10  &amp;lt;sampleRatio&amp;gt;1&amp;lt;/sampleRatio&amp;gt;
        11  &amp;lt;refresh&amp;gt;1m&amp;lt;/refresh&amp;gt;
         12 &amp;lt;refreshType&amp;gt;delay&amp;lt;/refreshType&amp;gt;
      13  &amp;lt;/search&amp;gt;

   14   
 15   
   16 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 01 Aug 2019 11:08:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-add-timestamp-in-all-dashboard-panels/m-p/420759#M27713</guid>
      <dc:creator>kartm2020</dc:creator>
      <dc:date>2019-08-01T11:08:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to add timestamp in all dashboard panels</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-add-timestamp-in-all-dashboard-panels/m-p/420760#M27714</link>
      <description>&lt;P&gt;Transaction dashboard&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;panel&amp;gt;
  &amp;lt;title&amp;gt;ERROR&amp;lt;/title&amp;gt;
  &amp;lt;single&amp;gt;
    &amp;lt;title&amp;gt;LAST 5 MINS&amp;lt;/title&amp;gt;
    &amp;lt;search&amp;gt;
      &amp;lt;query&amp;gt;XXX&amp;lt;/query&amp;gt;
      &amp;lt;earliest&amp;gt;-5m&amp;lt;/earliest&amp;gt;
      &amp;lt;latest&amp;gt;now&amp;lt;/latest&amp;gt;
      &amp;lt;done&amp;gt;&amp;lt;eval token="lastUpdatedOn"&amp;gt; strftime(now(),"%m/%d/%Y %H:%M:%S") &amp;lt;/eval&amp;gt;&amp;lt;/done&amp;gt;
      &amp;lt;sampleRatio&amp;gt;1&amp;lt;/sampleRatio&amp;gt;
      &amp;lt;refresh&amp;gt;1m&amp;lt;/refresh&amp;gt;
      &amp;lt;refreshType&amp;gt;delay&amp;lt;/refreshType&amp;gt;
    &amp;lt;/search&amp;gt;
    &amp;lt;option name="colorMode"&amp;gt;block&amp;lt;/option&amp;gt;
    &amp;lt;option name="drilldown"&amp;gt;all&amp;lt;/option&amp;gt;
    &amp;lt;option name="rangeColors"&amp;gt;["0x53a051","0xf8be34","0xdc4e41"]&amp;lt;/option&amp;gt;
    &amp;lt;option name="rangeValues"&amp;gt;[5,10]&amp;lt;/option&amp;gt;
    &amp;lt;option name="refresh.display"&amp;gt;progressbar&amp;lt;/option&amp;gt;
    &amp;lt;option name="useColors"&amp;gt;1&amp;lt;/option&amp;gt;
  &amp;lt;/single&amp;gt;
&amp;lt;/panel&amp;gt;
&amp;lt;panel&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 01 Aug 2019 11:09:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-add-timestamp-in-all-dashboard-panels/m-p/420760#M27714</guid>
      <dc:creator>kartm2020</dc:creator>
      <dc:date>2019-08-01T11:09:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to add timestamp in all dashboard panels</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-add-timestamp-in-all-dashboard-panels/m-p/420761#M27715</link>
      <description>&lt;P&gt;where would you like to have the time field, in the panel title or as a column / field in your panel? Both ways are possible&lt;/P&gt;</description>
      <pubDate>Thu, 01 Aug 2019 16:17:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-add-timestamp-in-all-dashboard-panels/m-p/420761#M27715</guid>
      <dc:creator>Sukisen1981</dc:creator>
      <dc:date>2019-08-01T16:17:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to add timestamp in all dashboard panels</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-add-timestamp-in-all-dashboard-panels/m-p/420762#M27716</link>
      <description>&lt;P&gt;If you're looking for a timestamp that gets printed for each of your panels, one way to do it would be to generate a timestamp token, and then add that token to each panel's title. Here is an example:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;form&amp;gt;
  &amp;lt;label&amp;gt;Timestamp demo&amp;lt;/label&amp;gt;
  &amp;lt;fieldset submitButton="false" autoRun="false"&amp;gt;
    &amp;lt;input type="time" token="field1"&amp;gt;
      &amp;lt;label&amp;gt;&amp;lt;/label&amp;gt;
      &amp;lt;default&amp;gt;
        &amp;lt;earliest&amp;gt;-24h@h&amp;lt;/earliest&amp;gt;
        &amp;lt;latest&amp;gt;now&amp;lt;/latest&amp;gt;
      &amp;lt;/default&amp;gt;
    &amp;lt;/input&amp;gt;
  &amp;lt;/fieldset&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;table&amp;gt;
        &amp;lt;title&amp;gt;Last Updated: $timestamp$&amp;lt;/title&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;(your search here)&amp;lt;/query&amp;gt;
          &amp;lt;earliest&amp;gt;$field1.earliest$&amp;lt;/earliest&amp;gt;
          &amp;lt;latest&amp;gt;$field1.latest$&amp;lt;/latest&amp;gt;
        &amp;lt;/search&amp;gt;
        &amp;lt;option name="drilldown"&amp;gt;none&amp;lt;/option&amp;gt;
      &amp;lt;/table&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;panel depends="$hidden$"&amp;gt;
      &amp;lt;table&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;| makeresults | eval timestamp=strftime(_time,"%Y-%m-%d %H:%M:%S")&amp;lt;/query&amp;gt;
          &amp;lt;earliest&amp;gt;-1s@s&amp;lt;/earliest&amp;gt;
          &amp;lt;latest&amp;gt;now&amp;lt;/latest&amp;gt;
          &amp;lt;done&amp;gt;
            &amp;lt;condition match="$job.doneProgress$=1"&amp;gt;
              &amp;lt;set token="timestamp"&amp;gt;$result.timestamp$&amp;lt;/set&amp;gt;
            &amp;lt;/condition&amp;gt;
          &amp;lt;/done&amp;gt;
        &amp;lt;/search&amp;gt;
      &amp;lt;/table&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;
&amp;lt;/form&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;For each panel you want to be annotated with the timestamp, simply edit the XML to have $timestamp$&lt;/P&gt;</description>
      <pubDate>Thu, 01 Aug 2019 16:39:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-add-timestamp-in-all-dashboard-panels/m-p/420762#M27716</guid>
      <dc:creator>jpolvino</dc:creator>
      <dc:date>2019-08-01T16:39:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to add timestamp in all dashboard panels</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-add-timestamp-in-all-dashboard-panels/m-p/420763#M27717</link>
      <description>&lt;P&gt;@kartm you would need to add more details to your question. Meanwhile, you can refer to one of my older answers on similar issue: &lt;A href="https://answers.splunk.com/answers/526670/display-datetime-range-in-dashbaord.html"&gt;https://answers.splunk.com/answers/526670/display-datetime-range-in-dashbaord.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Aug 2019 18:03:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-add-timestamp-in-all-dashboard-panels/m-p/420763#M27717</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2019-08-01T18:03:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to add timestamp in all dashboard panels</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-add-timestamp-in-all-dashboard-panels/m-p/420764#M27718</link>
      <description>&lt;P&gt;I would like to have it in panel title&lt;/P&gt;</description>
      <pubDate>Fri, 02 Aug 2019 06:12:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-add-timestamp-in-all-dashboard-panels/m-p/420764#M27718</guid>
      <dc:creator>kartm2020</dc:creator>
      <dc:date>2019-08-02T06:12:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to add timestamp in all dashboard panels</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-add-timestamp-in-all-dashboard-panels/m-p/420765#M27719</link>
      <description>&lt;P&gt;This XML code is working. but timestamp is not getting refreshed when i click the refresh button. But when i refresh whole web page it is getting refresh.&lt;BR /&gt;
Please look into it&lt;/P&gt;</description>
      <pubDate>Fri, 02 Aug 2019 07:08:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-add-timestamp-in-all-dashboard-panels/m-p/420765#M27719</guid>
      <dc:creator>kartm2020</dc:creator>
      <dc:date>2019-08-02T07:08:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to add timestamp in all dashboard panels</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-add-timestamp-in-all-dashboard-panels/m-p/420766#M27720</link>
      <description>&lt;P&gt;Wow great. It worked really. Thank you&lt;BR /&gt;
I have changed the refresh time as i min in the hidden panel.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Aug 2019 07:38:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-add-timestamp-in-all-dashboard-panels/m-p/420766#M27720</guid>
      <dc:creator>kartm2020</dc:creator>
      <dc:date>2019-08-02T07:38:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to add timestamp in all dashboard panels</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-add-timestamp-in-all-dashboard-panels/m-p/420767#M27721</link>
      <description>&lt;P&gt;Wow great. It worked really. Thank you&lt;BR /&gt;
I have changed the refresh time as i min in the hidden panel.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Aug 2019 07:39:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-add-timestamp-in-all-dashboard-panels/m-p/420767#M27721</guid>
      <dc:creator>kartm2020</dc:creator>
      <dc:date>2019-08-02T07:39:06Z</dc:date>
    </item>
  </channel>
</rss>

