Dashboards & Visualizations

Does anyone have experience with having new results (i.e. rows) that do something attention grabbing?

Dmikos1271
Explorer

We use Splunk dashboards with searches that refresh on regular intervals as screens to monitor in an operations center. Does anyone have experience with having new results (i.e. rows) light up, flash, do something else eye catching to grab attention?

Labels (4)
Tags (1)
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

You might be able to do this with some creative use of tokens and CSS

This technique uses the fact that when tokens change, searches which use those tokens are refreshed

Initialise the tokens with complementary colours and zero counter

    <set token="flashinterval">0</set>
    <set token="flashcolour">000000</set>
    <set token="flashback">ffffff</set>

Start with a hidden panel which swaps foreground and background colour tokens and increment a count token - the swapping (and incrementing) is limited (to 10 in this instance) so the attention grab eventually stops.

There is also some hidden CSS to implement the colour changes.

The panel being changed resets the counter when the search completes (after refreshing)

    <panel depends="$stayhidden$">
      <table>
        <search>
          <done>
            <set token="flashcolour">$result.colour$</set>
            <set token="flashback">$result.back$</set>
            <set token="flashinterval">$result.interval$</set>
          </done>
          <query>| makeresults
| eval colour=if($flashinterval$&lt;10,$flashback|s$,$flashcolour|s$)
| eval back=if($flashinterval$&lt;10,$flashcolour|s$,$flashback|s$)
| eval interval=if($flashinterval$&lt;10,$flashinterval$+1,$flashinterval$)
| table colour back interval</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </search>
        <option name="drilldown">none</option>
        <option name="refresh.display">progressbar</option>
      </table>
      <html>
        <style>
          div[id="flash"] tr[data-view$="ResultsTableRow"] td:nth-child(1)
          {
            color: #$flashcolour$ !important;
            background-color: #$flashback$ !important;
          }
        </style>
      </html>
    </panel>
    <panel>
      <table id="flash">
        <title>Flash</title>
        <search>
          <done>
            <set token="flashinterval">0</set>
          </done>
          <query>insert your search here</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </search>
        <option name="drilldown">none</option>
        <option name="refresh.display">progressbar</option>
      </table>
    </panel>

 

0 Karma
Get Updates on the Splunk Community!

Splunk AI Assistant for SPL | Key Use Cases to Unlock the Power of SPL

Splunk AI Assistant for SPL | Key Use Cases to Unlock the Power of SPL  The Splunk AI Assistant for SPL ...

Buttercup Games: Further Dashboarding Techniques (Part 5)

This series of blogs assumes you have already completed the Splunk Enterprise Search Tutorial as it uses the ...

Customers Increasingly Choose Splunk for Observability

For the second year in a row, Splunk was recognized as a Leader in the 2024 Gartner® Magic Quadrant™ for ...