Dashboards & Visualizations

rangemap not coloring single value panel

genesiusj
Builder

Here is my XML. In know I am missing something, but I can't figure it out.

<dashboard>
  <label>gcj_printerStatusv2</label>
  <row>
    <panel>
      <single>
        <search>
          <query>
index=oit_printer_monitoring
  AND type=Print*
| eval statusLevel = case(status="normal",1,status="offline",2)
| eval printerLoc = printer.location
| eval timeConv=strftime(_time,"%H:%M:%S %m/%d")
| eval statusTime = status.timeConv
| rangemap field=statusLevel low=1-1 severe=2-2 default=low
| replace "1" with "UP" in statusLevel
| replace "2" with "DOWN" in statusLevel
| where printer="oix12"
| stats latest(statusTime) BY printerLoc
          </query>
          <earliest>-4h@m</earliest>
          <latest>now</latest>
          <sampleRatio>1</sampleRatio>
        </search>
        <option name="colorBy">value</option>
        <option name="colorMode">block</option>
        <option name="drilldown">none</option>
        <option name="numberPrecision">0</option>
        <option name="rangeColors">["0x2af33e","0xff2727"]</option>
        <option name="rangeValues">[0]</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">large</option>
        <option name="trellis.splitBy">printerLoc</option>
        <option name="trendColorInterpretation">standard</option>
        <option name="trendDisplayMode">absolute</option>
        <option name="unitPosition">after</option>
        <option name="useColors">0</option>
        <option name="useThousandSeparators">1</option>
      </single>
    </panel>
  </row>
</dashboard>

Does rangemap work with trellis?

Thanks and God bless,
Genesius

0 Karma

efavreau
Motivator

I gave it a quick go and didn't find it to work as expected. I think my next step would be to switch out the rangemap for a case statement. Then you can chart low and severe on the same chart, and use trellis to show low on one chart and severe on another chart.

###

If this reply helps you, an upvote would be appreciated.
0 Karma
Get Updates on the Splunk Community!

Splunk Observability for AI

Don’t miss out on an exciting Tech Talk on Splunk Observability for AI!Discover how Splunk’s agentic AI ...

Splunk Enterprise Security 8.x: The Essential Upgrade for Threat Detection, ...

Watch On Demand the Tech Talk on November 6 at 11AM PT, and empower your SOC to reach new heights! Duration: ...

Splunk Observability as Code: From Zero to Dashboard

For the details on what Self-Service Observability and Observability as Code is, we have some awesome content ...