Dashboards & Visualizations

How to edit my dashboard XML to get a single value string to change color based on value ranges?

splunker1981
Path Finder

Hello Splunkers,

Hoping someone can help or point me in the right direction. I am trying to color code my single value string based on value ranges they fall under. Here is my XML. What I am trying to do is make the string RUNNING green and DOWN red. What am I missing here? I'm on version 6.4. Thanks for all the help in advance.

          <query>|stats count| fields - count | eval diff=2000|  eval status=case(diff<=1500, "RUNNING", diff >1501, "DOWN") |rangemap field=status low=0-1500 severe=1501-9999</query>
          <earliest>0</earliest>
          <latest></latest>
        </search>
        <option name="classField">range</option>
        <option name="field">status</option>
        <option name="drilldown">none</option>
        <option name="colorBy">value</option>
        <option name="colorMode">none</option>
        <option name="numberPrecision">0</option>
        <option name="rangeColors">["0x65a637","0x555555"]</option>
        <option name="showSparkline">1</option>
        <option name="showTrendIndicator">1</option>
        <option name="trendColorInterpretation">standard</option>
        <option name="trendDisplayMode">absolute</option>
        <option name="unitPosition">after</option>
        <option name="useColors">1</option>
        <option name="useThousandSeparators">1</option>
        <option name="linkView">search</option>
0 Karma
1 Solution

somesoni2
Revered Legend

Try this search

|stats count| fields - count | eval diff=2000|  eval status=case(diff<=1500, "RUNNING", diff >1501, "DOWN") |rangemap field=diff low=0-1500 severe=1501-9999 |table status range

View solution in original post

0 Karma

somesoni2
Revered Legend

Try this search

|stats count| fields - count | eval diff=2000|  eval status=case(diff<=1500, "RUNNING", diff >1501, "DOWN") |rangemap field=diff low=0-1500 severe=1501-9999 |table status range
0 Karma

splunker1981
Path Finder

Arggg, so the field has to be the value and then a table command is needed. Thanks for the help, somesoni2 this got things working.

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Unlock What’s Next: The Splunk Cloud Platform at .conf25

In just a few days, Boston will be buzzing as the Splunk team and thousands of community members come together ...