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!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...