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!

Join Us for Splunk University and Get Your Bootcamp Game On!

If you know, you know! Splunk University is the vibe this summer so register today for bootcamps galore ...

.conf24 | Learning Tracks for Security, Observability, Platform, and Developers!

.conf24 is taking place at The Venetian in Las Vegas from June 11 - 14. Continue reading to learn about the ...

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...