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!

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 ...