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
Get Updates on the Splunk Community!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...