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!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...