Splunk Search

Specific keyword based colour

jerinvarghese
Communicator

Hi Team,

need help in getting few nodelabel highlighted.  "WANRT"  & "DCNDC".

sitecodenodelabel
PJSLANCUA001
PCWLANCUA001
PCWWANINF001
PCWWANRTC001
PCWDCNDCI001

 

Below is the code that I used to get the "WANRT" devices highlighted with RED color, but i am unable to get the "DCNDC" devices too. 

 

 

        <format type="color" field="nodelabel">
          <colorPalette type="expression">if (like(value,"%WANRT%"),"#FF5733","#FFFFFF")</colorPalette>
        </format>

 

 

please help me with the code to get both highlighted.

Labels (5)

richgalloway
SplunkTrust
SplunkTrust

Have you tried this?

<format type="color" field="nodelabel">
  <colorPalette type="expression">
if (like(value,"%WANRT%") OR like(value, "DCNDC%"),"#FF5733","#FFFFFF")</colorPalette>
</format>
---
If this reply helps you, Karma would be appreciated.
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 ...