All Apps and Add-ons

autorefreshmodule and hiddensavedsearches

subtrakt
Contributor

Hi!

I have a dashboard with two tabs where an autorefresh module in tab #1.

The autorefresh module doesn't seem to be refreshing the scheduled searches panels as i was hoping. I have a feeling it doesn't work with scheduled searches as i am able to get it to work with regular inline searches...

The scheduled searches run every 10 mins and the autorefresh pulldown has 5min 10min, and "No Refresh" options... None of the options refresh the dashboard. It is also making the browser very sluggish.
Is this what you had in mind?

<module name="URLLoader" layoutPanel="panel_row1_col1" autoRun="True">

True


selectedTab


MONITOR
MONITOR


RESEARCH
RESEARCH


$selectedTab$


refreshRate
Refresh every:

<list>
  <param name="label">5m</param>
  <param name="value">300</param>
</list>
<list>
  <param name="label">10m</param>
  <param name="value">600</param>
 </list>
 <list>
  <param name="label">no refresh</param>
  <param name="value">0</param>
</list>


reloadEntirePage
$refreshRate$

sideview
SplunkTrust
SplunkTrust

You are correct - in its default mode the AutoRefresh module isn't able to get SavedSearch or (Splunk's HiddenSavedSearch module) to "move up" to the most recent scheduled run of a scheduled search.

The workaround is to set the "mode" param of the AutoRefresh module, which is an advanced thing you normally would leave unset btw. Set the mode param to "reloadEntirePage", and it will do exactly that. Note that you will certainly want to put a URLLoader module at the top of the view, and set the URLLoader's keepURLUpdated param to True, or else when the page refreshes, the user's selection for autorefresh interval will be lost.

UPDATE::

1) The AutoRefresh module actually wont trigger if it knows that it has been hidden by something, for instance if it's hidden by virtue of being in an inactive tab of the Tabs module. The idea is that it's trying to avoid dispatching searches that nobody can see.
Therefore if you want it to be autorefreshing the page even when the user has other tabs open, you'll want to pull both the Pulldown and the AutoRefresh module up out of the Tabs. XML is below.

2) Never put autoRun="True" on a module downstream from another module that has autoRun="True". autoRun was an extremely poor choice of name. Picture the attribute as "startACascadingPushFromHereOnPageLoad". that's actually what it does, and so you can imagine if you start lots of cascading pushes from points downstream from eachother, the framework is going to thrash and thrash making and aborting a ton of requests to the server. And in addition to the slowness all those autoRun's can cause, you can suffer from a whole class of bugs that I won't go into: Never Nest AutoRun inside AutoRun.

Anyway, here's some cleaned up XML:

<module name="URLLoader" layoutPanel="panel_row1_col1" autoRun="True">
  <param name="keepURLUpdated">True</param>

  <module name="Pulldown" layoutpanel="panel_row1_col1">
    <param name="name">refreshRate</param>
    <param name="label">Refresh every:</param>
    <param name="staticOptions">
      <list>
        <param name="label">5m</param>
        <param name="value">300</param>
      </list>
      <list>
        <param name="label">10m</param>
        <param name="value">600</param>
       </list>
       <list>
        <param name="label">no refresh</param>
        <param name="value">0</param>
      </list>
    </param>

    <module name="AutoRefresh">
      <param name="mode">reloadEntirePage</param>
      <param name="refreshEvery">$refreshRate$</param>
    </module>
  </module>


  <module name="Tabs" layoutpanel="panel_row2_col1">
    <param name="name">selectedTab</param>
    <param name="staticTabs">

    <list> 
      <param name="label">MONITOR</param> <param name="value">MONITOR</param> </list> <list> <param name="label">RESEARCH</param> <param name="value">RESEARCH</param> </list> 
    </param>
    <module name="Switcher" group=" ">
      <param name="selectedGroup">$selectedTab$</param>

      <module name="NullModule" group="MONITOR">
        .... other modules go here presumably...
0 Karma

subtrakt
Contributor

I think the push downstreatm to module param is great. When I used it on some inline searches i notices a big improvement in my browser resources and there isn't that jolt to my browsing every time the whole page reloaded.

Its too bad the push to module param doesn't work with the hiddensavedsearch. There is a big demand for that where I'm at since all our dashboards are big and based off of hiddensavedsearches for faster load times. I think there is a dynamic dashboard app that uses a loadjob module but i'd prefer to use sideview.

0 Karma

subtrakt
Contributor

another bit of good news is the URL is showing refreshRate=300 when 5m is selected and 600 when 10m is selected. Full page is not auto-refreshing though.

0 Karma

subtrakt
Contributor

updated the XML. Good news is the dash is not sluggish anymore however its not updating the full page when i have the pulldown and autorefresh module under the nullmodule group that represents the tab.

0 Karma
Get Updates on the Splunk Community!

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...