All Apps and Add-ons

How to change Status Indicator size

guimilare
Communicator

Hello Splunkers.

I have 2 questions about Status Indicator Viz and believe you guys can help me.

1) Is it possible to limit the size of the icon?
I know that with Single Value I can resize it using

<option name="height">300px</option>

Do I need a CSS to do that? What I have is on figure 1 and what I want is on figure 2:
alt text

alt text
BTW, at figure 2 I manually resized the Status Indicator with mouse.

2) Can I show a different icon based on value? For example, check icon when value is 0 and error icon when value is greather than 0?
I tried to use the option "Field Value" under format but no success.

Thank you!
Regards,

0 Karma
1 Solution

niketn
Legend

For any search that generates a numeric field like result, icon and color fields need to be mapped. Following are two options:

Option 1 - Use Rangemap to set range_color and range_icon


| table result | rangemap field=result green=0-0 yellow=1-10 red=10-11 default=severe|eval range_color=range |rangemap field=result arrow-circle-o-up=0-0 exclamation-circle=1-10 arrow-circle-o-down=10-11 default=arrow-circle-o-down| eval range_icon=range | table result, range_icon, range_color

Option 2 - Use Nested if or case statement


| table result | rangemap field=result green=0-0 yellow=1-10 red=10-11 default=severe|eval range_color=range |eval range_icon=if(result=0, "arrow-circle-o-up",if(result >0 AND result<=10,"exclamation-circle","arrow-circle-o-down"))| table result, range_icon, range_color

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"

View solution in original post

niketn
Legend

For any search that generates a numeric field like result, icon and color fields need to be mapped. Following are two options:

Option 1 - Use Rangemap to set range_color and range_icon


| table result | rangemap field=result green=0-0 yellow=1-10 red=10-11 default=severe|eval range_color=range |rangemap field=result arrow-circle-o-up=0-0 exclamation-circle=1-10 arrow-circle-o-down=10-11 default=arrow-circle-o-down| eval range_icon=range | table result, range_icon, range_color

Option 2 - Use Nested if or case statement


| table result | rangemap field=result green=0-0 yellow=1-10 red=10-11 default=severe|eval range_color=range |eval range_icon=if(result=0, "arrow-circle-o-up",if(result >0 AND result<=10,"exclamation-circle","arrow-circle-o-down"))| table result, range_icon, range_color

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"

guimilare
Communicator

Thank you niketnilay !!
It worked perfectly!

I was missing the statements eval range_color=range and eval range_icon=range

Regards!

0 Karma

guimilare
Communicator

Ok, the first one I've discovered myself.
The only thing you have to do is add the following line:

<option name="height">110px</option> 

(of course, you can set a value for height that fits you better)
In my case, the xml is:

<viz type="status_indicator_app.status_indicator">
        <search>
          <query> my search </query>
        </search>
        <option name="status_indicator_app.status_indicator.showOption">1</option>
        <option name="status_indicator_app.status_indicator.icon">fix_icon</option>
        <option name="status_indicator_app.status_indicator.fixIcon">info-circle</option>
        <option name="status_indicator_app.status_indicator.useColors">true</option>
        <option name="status_indicator_app.status_indicator.colorBy">field_value</option>
        <option name="status_indicator_app.status_indicator.staticColor">#555</option>
        <option name="status_indicator_app.status_indicator.fillTarget">text</option>
        <option name="status_indicator_app.status_indicator.precision">0</option>
        <option name="status_indicator_app.status_indicator.useThousandSeparator">true</option>
        <option name="height">110px</option>
      </viz>

Now, I'm working on the second question...

markuxProof
Path Finder

Thanks Master guimilare!

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Index This | What travels the world but is also stuck in place?

April 2026 Edition  Hayyy Splunk Education Enthusiasts and the Eternally Curious!   We’re back with this ...

Discover New Use Cases: Unlock Greater Value from Your Existing Splunk Data

Realizing the full potential of your Splunk investment requires more than just understanding current usage; it ...

Continue Your Journey: Join Session 2 of the Data Management and Federation Bootcamp ...

As data volumes continue to grow and environments become more distributed, managing and optimizing data ...