<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to make form refresh value configurable? in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-make-form-refresh-value-configurable/m-p/365245#M23860</link>
    <description>&lt;P&gt;@simpkins1958, one of the ways to do this could be through JavaScript. You can have your own JS file which sets dashboard refresh to specific value for example 5 minutes in this case:  &lt;CODE&gt;setTimeout("location.reload();", 300 * 1000);&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Instead of using refresh="300" you can use script="dashboard_refresh.js" in all your dashboards/forms.&lt;/STRONG&gt; In case you need to modify this interval you can do it at single place via this JavaScript file (you can create different script files/parameters within script for handling multiple refresh intervals for your dashboard.&lt;/P&gt;

&lt;P&gt;Simple Code for &lt;STRONG&gt;dashboard_refresh.js&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;require([
    'underscore',
    'jquery',
    'splunkjs/mvc',
    'splunkjs/mvc/tableview',
    'splunkjs/mvc/simplexml/ready!'
], function(_, $, mvc, TableView) {
    // Set Dashboard Timeout
        setTimeout("location.reload();", 300 * 1000);
});
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 28 Jun 2017 20:24:53 GMT</pubDate>
    <dc:creator>niketn</dc:creator>
    <dc:date>2017-06-28T20:24:53Z</dc:date>
    <item>
      <title>How to make form refresh value configurable?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-make-form-refresh-value-configurable/m-p/365244#M23859</link>
      <description>&lt;P&gt;We have a number of dashboards that have their form refresh attribute set to "300" for a 5 minute refresh rate. We want to make the 300 value configurable. Any suggestions?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;form refresh="300" &amp;gt;
...
...
&amp;lt;/form&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 27 Jun 2017 21:47:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-make-form-refresh-value-configurable/m-p/365244#M23859</guid>
      <dc:creator>simpkins1958</dc:creator>
      <dc:date>2017-06-27T21:47:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to make form refresh value configurable?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-make-form-refresh-value-configurable/m-p/365245#M23860</link>
      <description>&lt;P&gt;@simpkins1958, one of the ways to do this could be through JavaScript. You can have your own JS file which sets dashboard refresh to specific value for example 5 minutes in this case:  &lt;CODE&gt;setTimeout("location.reload();", 300 * 1000);&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Instead of using refresh="300" you can use script="dashboard_refresh.js" in all your dashboards/forms.&lt;/STRONG&gt; In case you need to modify this interval you can do it at single place via this JavaScript file (you can create different script files/parameters within script for handling multiple refresh intervals for your dashboard.&lt;/P&gt;

&lt;P&gt;Simple Code for &lt;STRONG&gt;dashboard_refresh.js&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;require([
    'underscore',
    'jquery',
    'splunkjs/mvc',
    'splunkjs/mvc/tableview',
    'splunkjs/mvc/simplexml/ready!'
], function(_, $, mvc, TableView) {
    // Set Dashboard Timeout
        setTimeout("location.reload();", 300 * 1000);
});
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 28 Jun 2017 20:24:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-make-form-refresh-value-configurable/m-p/365245#M23860</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-06-28T20:24:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to make form refresh value configurable?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-make-form-refresh-value-configurable/m-p/365246#M23861</link>
      <description>&lt;P&gt;This works well. Thanks.&lt;/P&gt;</description>
      <pubDate>Thu, 29 Jun 2017 21:41:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-make-form-refresh-value-configurable/m-p/365246#M23861</guid>
      <dc:creator>simpkins1958</dc:creator>
      <dc:date>2017-06-29T21:41:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to make form refresh value configurable?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-make-form-refresh-value-configurable/m-p/365247#M23862</link>
      <description>&lt;P&gt;Glad it worked &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Jun 2017 01:46:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-make-form-refresh-value-configurable/m-p/365247#M23862</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-06-30T01:46:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to make form refresh value configurable?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-make-form-refresh-value-configurable/m-p/365248#M23863</link>
      <description>&lt;P&gt;I feel there is no contradiction.  When there is a need demand comes and when demand comes we change the refresh rate of the dashboard.&lt;BR /&gt;
I also gave an example in the previous answer which is chrome extension, “Easy Auto-Refresh”.  I request you to have a look at it if you don’t mind.&lt;BR /&gt;
As Splunk is mainly used for monitoring, we from SOC team needs a real-time monitoring which is a very important factor.  In that case, following are the reasons,&lt;BR /&gt;
1)   You cannot expect me to Press F5 Key all the times.&lt;BR /&gt;&lt;BR /&gt;
2)  I can think of another option which is updating the Form of the dashboard.&lt;BR /&gt;
3)  Also, I can go ahead with writing a JS Query as mentioned in the link given.&lt;BR /&gt;
I accept these can be performed.  But these are all work-around.  Don’t Splunk have an option available in-built?  Please suggest if available.&lt;/P&gt;</description>
      <pubDate>Sun, 03 Jun 2018 19:38:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-make-form-refresh-value-configurable/m-p/365248#M23863</guid>
      <dc:creator>gokikrishnan198</dc:creator>
      <dc:date>2018-06-03T19:38:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to make form refresh value configurable?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-make-form-refresh-value-configurable/m-p/365249#M23864</link>
      <description>&lt;P&gt;@gokikrishnan1982, I think you have posted on wrong answer. You should have posted a comment on your original question i.e. &lt;A href="https://answers.splunk.com/answers/663030/how-to-auto-refresh-the-dashboard-using-splunk-app-3.html"&gt;https://answers.splunk.com/answers/663030/how-to-auto-refresh-the-dashboard-using-splunk-app-3.html&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;After looking at a Easy Auto Refresh behavior, seems like you are looking for an option to have dashboard refreshed on a regular interval, which can be done via &lt;CODE&gt;refresh&lt;/CODE&gt; attribute i.e. &lt;CODE&gt;&amp;lt;form refresh="300"&amp;gt;&lt;/CODE&gt; or &lt;CODE&gt;&amp;lt;dashboard refresh="300"&amp;gt;&lt;/CODE&gt; which sets refresh time to 300 seconds or 5 minute. Refer to documentation below:&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Viz/PanelreferenceforSimplifiedXML#dashboard_or_form"&gt;http://docs.splunk.com/Documentation/Splunk/latest/Viz/PanelreferenceforSimplifiedXML#dashboard_or_form&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;If you want this setting as configurable setting in the UI, you would need to code using JavaScript. Which is not a workaround as depending on coding level Simple XML JS Extension, HTML Dashboards and Splunk JS stack are all Splunk App Development mechanisms. Please let us know if you would need a help with this.&lt;/P&gt;

&lt;P&gt;From UI Splunk gives you an option to set the Refresh Interval of individual Panels in the Dashboard by Refreshing &lt;CODE&gt;&amp;lt;search&amp;gt;&lt;/CODE&gt; using &lt;CODE&gt;&amp;lt;refresh&amp;gt;&lt;/CODE&gt; attribute. (If you establish a dependency between base search and all remaining searches, you can set this once and it will do a cascaded refresh or other searches as well). Refer to documentation:  &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Viz/PanelreferenceforSimplifiedXML#search"&gt;http://docs.splunk.com/Documentation/Splunk/latest/Viz/PanelreferenceforSimplifiedXML#search&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;If none of these cater to your needs and you need Splunk UI to support dashboard/form &lt;CODE&gt;&amp;lt;refresh&amp;gt;&lt;/CODE&gt;, you would need to request an enhancement in Splunk by reaching out to Splunk Support with your Splunk Entitlement.&lt;/P&gt;

&lt;P&gt;PS: I will post this same answer also on your original question as this is a different answer only for your reference.&lt;/P&gt;</description>
      <pubDate>Sun, 03 Jun 2018 21:46:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-make-form-refresh-value-configurable/m-p/365249#M23864</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2018-06-03T21:46:31Z</dc:date>
    </item>
  </channel>
</rss>

