Dashboards & Visualizations

Splunk 6 - Chooseable autorefresh

JensT
Communicator

Hi,

I also need an auto-refresh, but a chooseable.
Means, I want a dropdown with "15s", "1m", "15m", "1h" and according to this the autorefresh is set.

Yes, I read: how-can-i-auto-refresh-my-dashboard

Splunk Version: 6, Using advanced XML.

Regards,
Jens

0 Karma

sideview
SplunkTrust
SplunkTrust

Sideview Utils 3.0 released today and it includes a new module called AutoRefresh.

At it's simplest it's just two lines. Here's an example of it refreshing a single chart:

<module name="AutoRefresh" layoutPanel="panel_row2_col1" autoRun="True">
  <param name="refreshEvery">15</param>

  <module name="Search">
    <param name="search">index=_internal component=metrics group=per_sourcetype_thruput | timechart span=1min sum(kb) by series</param>
    <param name="earliest">-15min</param>
    <param name="latest">now</param>

    <module name="ValueSetter">
      <param name="arg.charting.chart">line</param>

      <module name="JSChart" />
    </module>
  </module>
</module>

It also accepts $foo$ substitution into its refreshEvery param, which means you can easily use other Sideview modules to give the user control over the refresh frequency. Here is another example (both these examples are copied from the Sideview Utils docs btw)

<module name="Pulldown" layoutPanel="panel_row3_col1" autoRun="True">
  <param name="name">refreshRate</param>
  <param name="label">Refresh every:</param>
  <param name="staticOptions">
    <list>
      <param name="label">no refresh</param>
      <param name="value">0</param>
    </list>
    <list>
      <param name="label">5 seconds</param>
      <param name="value">5</param>
    </list>
    <list>
      <param name="label">10 seconds</param>
      <param name="value">10</param>
    </list>
    <list>
      <param name="label">30 seconds</param>
      <param name="value">30</param>
    </list>
  </param>
  <module name="AutoRefresh">
    <param name="refreshEvery">$refreshRate$</param>

    <module name="Search">
      <param name="search">index=_internal component=metrics group=per_sourcetype_thruput | timechart span=1min sum(kb) by series</param>
      <param name="earliest">-15min</param>
      <param name="latest">now</param>

      <module name="ValueSetter">
        <param name="arg.charting.chart">line</param>

        <module name="JSChart" />
      </module>
    </module>
  </module>
</module>
0 Karma

ShaneNewman
Motivator

Advanced XML is depreciated in Splunk 6.0... We have not converted our deployment yet because of this. That being said, using Sideview Utils, you should be able to do this. Ping him, user sideview, and he should be able to point you in the right direction.

0 Karma
Get Updates on the Splunk Community!

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 ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...