Splunk IT Service Intelligence

How to customize colors on a XML dashboard based on status indicators?

dsmith1988
Engager

I am trying to create a dashboard that shows a red box around a failed or down state, and a green box around passed or up state. Currently, I am getting the dashboard, but the boxes will only show as black.

Could someone please show me what I am doing wrong?

<dashboard>
  <label>Website State</label>
  <row>
    <panel>
      <single>
        <search>
          <query>index="amazon-aws" sourcetype="aws:cloudwatchlogs" state_new=* AND site_location=*
                |eval state_new=if(state_new=="PASSED","up","down")
                |eval range=if(state_new=="PASSED","low","severe")
                |stats latest(state_new) AS state_new BY site_location</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </search>
        <option name="colorBy">value</option>
        <option name="colorMode">block</option>
        <option name="drilldown">none</option>
        <option name="field">range</option>
        <option name="numberPrecision">0</option>
        <option name="rangeColors">["0x53a051", "0x0877a6", "0xf8be34", "0xf1813f", "0xdc4e41"]</option>
        <option name="rangeValues">[0,30,70,100]</option>
        <option name="showSparkline">1</option>
        <option name="showTrendIndicator">1</option>
        <option name="trellis.enabled">1</option>
        <option name="trellis.scales.shared">1</option>
        <option name="trellis.size">small</option>
        <option name="trellis.splitBy">site_location</option>
        <option name="unitPosition">after</option>
        <option name="useColors">1</option>
        <option name="useThousandSeparators">1</option>
      </single>
    </panel>
  </row>
</dashboard>

alt text

Labels (3)
0 Karma
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...