All Apps and Add-ons

Sideview Utils Multiplexer: How to use icons instead of colors for rangemap?

royimad
Builder
 <!-- BEGIN EXAMPLE -->
  <module name="Search" layoutPanel="panel_row4_col1" autoRun="True">
    <param name="search">sourcetype="testcsvlog" earliest=-1d@d latest=now
          | stats avg(LOGDURATION) as Average by USERID
          | rangemap field=Average low=1-100 elevated=101-300 default=severe</param>
    <param name="earliest">-15m</param>
    <param name="latest">now</param>

    <module name="JobProgressIndicator" />

    <module name="Multiplexer">
      <param name="fields">USERID,Average,range</param>
      <module name="HTML">
        <param name="html"><![CDATA[
          <div class="valueDisplay">
            <div class="inner $range$"><b>$USERID$</b> ($Average$ millseconds)</div>
          </div>
        ]]></param>

      </module>
    </module>
  </module>
  <!-- END EXAMPLE -->

The default behavior is using Sideview Util's range colors while I want to use icons instead. How do I do that?

1 Solution

sideview
SplunkTrust
SplunkTrust

Just use the $range$ token in your HTML module such that it ends up picking one of a number of icons you have loaded in appserver/static

Here's an example that expects there to be images like $SPLUNK_HOME/etc/apps/sideview_utils/appserver/static/images/ICON_severe.gif

<module name="Multiplexer">
   <param name="fields">USERID,Average,range</param>
   <module name="HTML">
     <param name="html"><![CDATA[
       <div class="valueDisplay">
         <div class="inner"><img src="/static/app/sideview_utils/images/ICON_$range$.gif" />
           <b>$USERID$</b> ($Average$ millseconds)</div>
        </div>
     ]]></param>
   </module>
</module>

View solution in original post

sideview
SplunkTrust
SplunkTrust

Just use the $range$ token in your HTML module such that it ends up picking one of a number of icons you have loaded in appserver/static

Here's an example that expects there to be images like $SPLUNK_HOME/etc/apps/sideview_utils/appserver/static/images/ICON_severe.gif

<module name="Multiplexer">
   <param name="fields">USERID,Average,range</param>
   <module name="HTML">
     <param name="html"><![CDATA[
       <div class="valueDisplay">
         <div class="inner"><img src="/static/app/sideview_utils/images/ICON_$range$.gif" />
           <b>$USERID$</b> ($Average$ millseconds)</div>
        </div>
     ]]></param>
   </module>
</module>
Get Updates on the Splunk Community!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...