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
Get Updates on the Splunk Community!

CX Day is Coming!

Customer Experience (CX) Day is on October 7th!! We're so excited to bring back another day full of wonderful ...

Strengthen Your Future: A Look Back at Splunk 10 Innovations and .conf25 Highlights!

The Big One: Splunk 10 is Here!  The moment many of you have been waiting for has arrived! We are thrilled to ...

Now Offering the AI Assistant Usage Dashboard in Cloud Monitoring Console

Today, we’re excited to announce the release of a brand new AI assistant usage dashboard in Cloud Monitoring ...