Dashboards & Visualizations

Panel refresh in dashboard

mskccvb
Loves-to-Learn

If a panel in dashboard refresh every 1 hour, and want to show what time refreshed in the text area [ like "As of 4pm", "As of 5pm" etc.]. Any idea of how to implement it?

 

mskccvb_0-1620958776870.png

 

Labels (1)
0 Karma

kamlesh_vaghela
SplunkTrust
SplunkTrust

@mskccvb 

Try below example.

<dashboard>
  <label>Panel Refresh</label>
  <row>
    <panel>
      <title>Refresh Panel Test</title>
      <table>
        <title>Refresh Panel at $tk_refresh_at$</title>
        <search>
          <query>index=_internal | stats count by sourcetype 
| eval refresh_at = strftime(now(),"%H %p")</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
          <sampleRatio>1</sampleRatio>
          <done>
            <set token="tk_refresh_at">$result.refresh_at$</set>
          </done>
        </search>
        <fields>sourcetype,count</fields>
        <option name="count">20</option>
        <option name="dataOverlayMode">none</option>
        <option name="drilldown">none</option>
        <option name="percentagesRow">false</option>
        <option name="rowNumbers">false</option>
        <option name="totalsRow">false</option>
        <option name="wrap">true</option>
      </table>
    </panel>
  </row>
</dashboard>

 

 

If this reply helps you, an upvote would be appreciated.

 

Thanks
Kamlesh Vaghela

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...