All Apps and Add-ons

Status Indicator Visualization not visualizing properly

brandonbachman
Engager

I am trying to use the Status Indicator Visualization to create a panel that lists a server name and changes background color based on count. The panel background should be green and there should be the check mark icon if count>0. If count<=0, the background should be red and the icon should be the circular x.

<row>
    <panel>
        <viz type="status_indicator_app.status_indicator">
            <search>
                <query>host="HOST-1"
                    | eval server="SERVER-1"
                    | stats count by server
                    | eval color=if(count<=0, "#dc4e41", "#65a637"),icon=if(count<=0, "times-circle", "check-circle")
                     | table server icon color</query>
               <earliest>-24h@h</earliest>
               <latest>now</latest>
            </search>
            <option name="drilldown">none</option>
            <option name="refresh.display">progressbar</option>
            <option name="status_indicator_app.status_indicator.colorBy">field_value</option>
            <option name="status_indicator_app.status_indicator.fillTarget">background</option>
            <option name="status_indicator_app.status_indicator.fixIcon">warning</option>
            <option name="status_indicator_app.status_indicator.icon">field_value</option>
            <option name="status_indicator_app.status_indicator.precision">0</option>
            <option name="status_indicator_app.status_indicator.showOption">3</option>
            <option name="status_indicator_app.status_indicator.staticColor">#555</option>
            <option name="status_indicator_app.status_indicator.useColors">true</option>
            <option name="status_indicator_app.status_indicator.useThousandSeparator">false</option>
        </viz>
    </panel>
</row>

With this code I am able to see the proper values for icon, color, and count in the table, but the visualization isn't showing properly (the background isn't changing color and there are no icons). Is there something wrong with my syntax?

alt text

0 Karma

mydog8it
Builder

The "greater than" and "less than" signs must be encoded differently. Try using < in place of "less than" and > in place of "greater than"

 <row>
     <panel>
         <viz type="status_indicator_app.status_indicator">
             <search>
                 <query>host="HOST-1"
                     | eval server="SERVER-1"
                     | stats count by server
                     | eval color=if(count<=0, "#dc4e41", "#65a637"),icon=if(count<=0, "times-circle", "check-circle")
                      | table server icon color</query>
                <earliest>-24h@h</earliest>
                <latest>now</latest>
             </search>
             <option name="drilldown">none</option>
             <option name="refresh.display">progressbar</option>
             <option name="status_indicator_app.status_indicator.colorBy">field_value</option>
             <option name="status_indicator_app.status_indicator.fillTarget">background</option>
             <option name="status_indicator_app.status_indicator.fixIcon">warning</option>
             <option name="status_indicator_app.status_indicator.icon">field_value</option>
             <option name="status_indicator_app.status_indicator.precision">0</option>
             <option name="status_indicator_app.status_indicator.showOption">3</option>
             <option name="status_indicator_app.status_indicator.staticColor">#555</option>
             <option name="status_indicator_app.status_indicator.useColors">true</option>
             <option name="status_indicator_app.status_indicator.useThousandSeparator">false</option>
         </viz>
     </panel>
 </row>
0 Karma
Get Updates on the Splunk Community!

Take Your Breath Away with Splunk Risk-Based Alerting (RBA)

WATCH NOW!The Splunk Guide to Risk-Based Alerting is here to empower your SOC like never before. Join Haylee ...

SignalFlow: What? Why? How?

What is SignalFlow? Splunk Observability Cloud’s analytics engine, SignalFlow, opens up a world of in-depth ...

Federated Search for Amazon S3 | Key Use Cases to Streamline Compliance Workflows

Modern business operations are supported by data compliance. As regulations evolve, organizations must ...