May be a quick question to UI experts out there.
My dashboard have auto-refresh enabled, but wanted to show the "last updated" (refreshed) time in another panel.
Is there an easy simpleXML function for this?
(I'm thinking of running a dummy search and putting the timestamp as last resort)
Cheers
You can set a token to the current time when your panel search is completed. You can then use the token in other panel to display it. I think it can be done with something like this:-
<panel>
<title></title>
<table>
<search>
<query>index=_internal | top sourcetype</query>
<earliest>0</earliest>
<latest>now</latest>
<done>
<eval token="lastUpdatedOn">strftime(now(),"%m/%d/%Y %H:%M:%S")</eval>
</done>
</search>
...other options
</table>
</panel>
Reference:
http://docs.splunk.com/Documentation/Splunk/6.4.1/Viz/PanelreferenceforSimplifiedXML#search
You can set a token to the current time when your panel search is completed. You can then use the token in other panel to display it. I think it can be done with something like this:-
<panel>
<title></title>
<table>
<search>
<query>index=_internal | top sourcetype</query>
<earliest>0</earliest>
<latest>now</latest>
<done>
<eval token="lastUpdatedOn">strftime(now(),"%m/%d/%Y %H:%M:%S")</eval>
</done>
</search>
...other options
</table>
</panel>
Reference:
http://docs.splunk.com/Documentation/Splunk/6.4.1/Viz/PanelreferenceforSimplifiedXML#search
Cheers. It works
What version of Splunk you're using?
6.4.1 enterprise