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!

Improve Your Security Posture

Watch NowImprove Your Security PostureCustomers are at the center of everything we do at Splunk and security ...

Maximize the Value from Microsoft Defender with Splunk

 Watch NowJoin Splunk and Sens Consulting for this Security Edition Tech TalkWho should attend:  Security ...

This Week's Community Digest - Splunk Community Happenings [6.27.22]

Get the latest news and updates from the Splunk Community here! News From Splunk Answers ✍️ Splunk Answers is ...