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!

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!

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

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...