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!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...