Hi Friends,
could you pls advise, how to add the dashboard Last updated time on the dashboard page to understand when the page refreshed.
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>
Hi All,
Thank you for sharing the details of displaying the last update/refreshed date-time.
In my case, it takes my local system's timezone. I changed the timezone in Splunk from default to EST, but it still takes and displays time as per local timezone. Can you please share a way to display the date time for a specific timezone irrespective of the local timezone on which the dashboard is being accessed?
Thank you
Hi @Taruchit
The thread you're replying to is a really old one. Also, your question is not really directly connected with the main subject of the thread.
Please start a new thread with your question. If you already tried something from this thread, you can always drop a link to it with explanation.
Thank you for your response. I have created a new thread to seek help on the problem: -
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>
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>
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>