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

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer Certification at ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...