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 as Code: From Zero to Dashboard

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

[Puzzles] Solve, Learn, Repeat: Character substitutions with Regular Expressions

This challenge was first posted on Slack #puzzles channelFor BORE at .conf23, we had a puzzle question which ...

Shape the Future of Splunk: Join the Product Research Lab!

Join the Splunk Product Research Lab and connect with us in the Slack channel #product-research-lab to get ...