Splunk Search

How to edit XML to set certain colors for bars in a chart based on percentage values from my data?

splunkman341
Communicator

Hi guys,

I am trying to edit a chart I have to have certain colors corresponding to the data inside. I have 5 servers with the same paths, just different server names and the graph indicates the percentage of the file system that is being used. For example, "server 1" is displaying a 47 because 47% of the file system is being used. I want to have any bar greater than 80% to display as red, between 50-80% to display as yellow, and less than 50% to make green.

Thanks in advance for your help

0 Karma

neelamssantosh
Contributor

Go the panel--> edit source-->

  {"80%": ff0000 , "50%-80%": FFFF00 , "Less Than 50%":00ff00 }
</option>

ff0000 for Red

FFFF00 for Yellow

00ff00 for Green

For reference:
http://docs.splunk.com/Documentation/Splunk/6.2.3/Viz/BuildandeditdashboardswithSimplifiedXML#Specif...

splunkman341
Communicator

I have tried adding this line into the xml, as well as altering the numbers inside to exclude the percentages, and in both cases, the chart still has its multi colors. Any other suggestions on what to do?

{"80%-100%": ff0000 , "50%-80%": FFFF00 , "Less Than 50%":00ff00 }

0 Karma
Get Updates on the Splunk Community!

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...

.conf24 | Personalize your .conf experience with Learning Paths!

Personalize your .conf24 Experience Learning paths allow you to level up your skill sets and dive deeper ...

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...