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!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Wondering How to Build Resiliency in the Cloud?

IT leaders are choosing Splunk Cloud as an ideal cloud transformation platform to drive business resilience,  ...

Updated Data Management and AWS GDI Inventory in Splunk Observability

We’re making some changes to Data Management and Infrastructure Inventory for AWS. The Data Management page, ...