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!

Enterprise Security Content Update (ESCU) | New Releases

In December, the Splunk Threat Research Team had 1 release of new security content via the Enterprise Security ...

Why am I not seeing the finding in Splunk Enterprise Security Analyst Queue?

(This is the first of a series of 2 blogs). Splunk Enterprise Security is a fantastic tool that offers robust ...

Index This | What are the 12 Days of Splunk-mas?

December 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...