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!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...