Dashboards & Visualizations

How do I auto-refresh my dashboard?

luislema
Path Finder

I need to auto-refresh my dashboard every 5 minutes. What code do I need to add? This is the source code:

<form>
  <label>Revenue</label>
  <fieldset submitButton="false" autoRun="true">
    <input type="time" token="field1" searchWhenChanged="true">
      <label>Select a time frame</label>
      <default>
        <earliest>@d</earliest>
        <latest>now</latest>
      </default>
    </input>
  </fieldset>
  <row>
    <panel>
      <single>
        <search>
          <query>source=revenue | eval dateInField=strptime(Date,"%Y-%m-%d %H:%M:%S.%3N") | where dateInField >= relative_time(now(), "@d") AND dateInField < relative_time(now(), "@d+24h") | chart sum(Revenue)</query>
          <earliest>$field1.earliest$</earliest>
          <latest>$field1.latest$</latest>
          <sampleRatio>1</sampleRatio>
        </search>
        <option name="colorBy">value</option>
        <option name="colorMode">none</option>
        <option name="drilldown">none</option>
        <option name="numberPrecision">0.00</option>
        <option name="rangeColors">["0x65a637","0x6db7c6","0xf7bc38","0xf58f39","0x65a637"]</option>
        <option name="rangeValues">[0,30,70,100]</option>
        <option name="showSparkline">1</option>
        <option name="showTrendIndicator">1</option>
        <option name="trendColorInterpretation">standard</option>
        <option name="trendDisplayMode">absolute</option>
        <option name="underLabel">Today's Authorized Sales</option>
        <option name="unit">$</option>
        <option name="unitPosition">before</option>
        <option name="useColors">1</option>
        <option name="useThousandSeparators">1</option>
      </single>
    </panel>
  </row>
</form>
0 Karma
1 Solution

somesoni2
Revered Legend

There is a refresh attribute available for your <form> or <dashboard> tag, which sets the interval after which you want to refresh whole dashboard automatically. See the table here http://docs.splunk.com/Documentation/Splunk/6.3.0/Viz/PanelreferenceforSimplifiedXML#dashboard

Usage

   <form refresh="300">
       <label>Revenue</label>
       <fieldset submitButton="false" autoRun="true">
 ....rest of the code.....

View solution in original post

somesoni2
Revered Legend

There is a refresh attribute available for your <form> or <dashboard> tag, which sets the interval after which you want to refresh whole dashboard automatically. See the table here http://docs.splunk.com/Documentation/Splunk/6.3.0/Viz/PanelreferenceforSimplifiedXML#dashboard

Usage

   <form refresh="300">
       <label>Revenue</label>
       <fieldset submitButton="false" autoRun="true">
 ....rest of the code.....

somesoni2
Revered Legend

Also, there is refresh.auto.interval option available for all visualization elements (chart/table/map etc) which does the auto refresh of that panel element only. If you want to refresh only few panels of your dashboard (which may changes while other panel result will stay same), OR want to different refresh interval for different panels, use that instead. E.g.

<panel>
    <chart>
    .....
         <option name="refresh.auto.interval">300</option>
    .....
</chart>
....

CARLOSEMONTESP
Explorer

This is Deprecated.

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Announcing Modern Navigation: A New Era of Splunk User Experience

We are excited to introduce the Modern Navigation feature in the Splunk Platform, available to both cloud and ...

Modernize your Splunk Apps – Introducing Python 3.13 in Splunk

We are excited to announce that the upcoming releases of Splunk Enterprise 10.2.x and Splunk Cloud Platform ...

Step into “Hunt the Insider: An Splunk ES Premier Mystery” to catch a cybercriminal ...

After a whole week of being on call, you fell asleep on your keyboard, and you hit a sequence of buttons that ...