Dashboards & Visualizations
Highlighted

How to display the page last updated time in the dashboard

New Member

Hi Friends,

could you pls advise, how to add the dashboard Last updated time on the dashboard page to understand when the page refreshed.

Labels (1)
Tags (1)
0 Karma
Highlighted

Re: How to display the page last updated time in the dashboard

Influencer

hi @anjibabu,

Try this.

<dashboard>
  <init>
    <eval token="curTime">strftime(now(), "%d-%m-%Y %H:%M:%S")</eval>
  </init>
  <label>Title</label>
  <row>
    <panel>
      <html>
          <h3>Dashboard refreshed at: $curTime$.</h3>
      </html>
    </panel>
  </row>
  <row>
    <panel>
      <table>
        <title>_internal index</title>
        <search>
          <query>index=_internal earliest=-15m | stats count by sourcetype, source, host</query>
          <earliest>-5m</earliest>
          <latest>now</latest>
        </search>
        <option name="drilldown">none</option>
      </table>
    </panel>
  </row>
</dashboard>

View solution in original post

0 Karma
Highlighted

Re: How to display the page last updated time in the dashboard

New Member

Thank you so much for your prompt response @manjunathmeti.

I have updated my dashboard with the above code, my dashboard refresh on every 5 mins, the new date panel is not refreshing and showing latest time, but when i refresh the browser or close\open the dashboard then only it is showing the latest time, could you pls advise.

below is my code.

<eval token="curTime">strftime(now(), "%d-%m-%Y %H:%M")</eval>

SRE Dashboard Clone_4/2/20202

<earliest>-1h@h</earliest>
<latest>now</latest>
<refresh>5m</refresh>
<refreshType>delay</refreshType>


<earliest>-1h@h</earliest>
<latest>now</latest>
<refresh>5m</refresh>
<refreshType>delay</refreshType>

<row>
<panel>
  <html>
     <body style="background-color:powderblue;">
     <div style="float:right;">
       <h3>Last Updated: $curTime$</h3>
        </div>
        </body>
   </html>
</panel>


<panel>
  <html>
    <body style="background-color:powderblue;">
     <div style="float:left;">
      <h3>
        <font size="15" color="DodgerBlue">Domino</font>
        </h3>
        </div>
        </body>
       </html>
</panel>


<panel>
  <html> 
     <div style="float:left;">
      <h3>
        <font size="5" color="LightSkyBlue">Extractors</font>
      </h3>
      </div>
     </html>
</panel>
0 Karma
Highlighted

Re: How to display the page last updated time in the dashboard

New Member

Hi Friends,

could you please share your inputs here.

<eval token="curTime">strftime(now(), "%H:%M")</eval>

SRE Dashboard Clone_4/2/20202

<earliest>-1h@h</earliest>
<latest>now</latest>
<refresh>5m</refresh>
<refreshType>delay</refreshType>


<earliest>-1h@h</earliest>
<latest>now</latest>
<refresh>5m</refresh>
<refreshType>delay</refreshType>


<panel>
  <html>
     <body style="background-color:powderblue;">
     <div style="float:right;">
       <h3>Last Updated: $curTime$</h3>
        </div>
        </body>
   </html>
</panel>


<panel>
  <html>
    <body style="background-color:powderblue;">
     <div style="float:left;">
      <h3>
        <font size="15" color="DodgerBlue">Dom</font>
        </h3>
        </div>
        </body>
       </html>
</panel>
0 Karma
Speak Up for Splunk Careers!

We want to better understand the impact Splunk experience and expertise has has on individuals' careers, and help highlight the growing demand for Splunk skills.