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
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

A Four-Part Event Series: Full Stack Observability For the AI Era

As AI reshapes applications, infrastructure, and the way teams operate, the traditional boundaries of ...

SOC4Kafka - New Kafka Connector Powered by OpenTelemetry

The new SOC4Kafka connector, built on OpenTelemetry, enables the collection of Kafka messages and forwards ...

Event Series: Level up your SOC: Advancing with Splunk Enterprise Security

AI has fundamentally raised the stakes for security operations, and this three-part series is your guide to ...