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 September, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...

New in Observability - Improvements to Custom Metrics SLOs, Log Observer Connect & ...

The latest enhancements to the Splunk observability portfolio deliver improved SLO management accuracy, better ...

Improve Data Pipelines Using Splunk Data Management

  Register Now   This Tech Talk will explore the pipeline management offerings Edge Processor and Ingest ...