Dashboards & Visualizations

Show colors in dashboard based on values.

ambujhbti
New Member

Hi All,

I want to show some colors based on values on my dashboard. like below

If count is >100 then i need to show RED color as a status.

If count >70 then i need to show YELLOW color

If count <50 then its green color

I have read some posts and it says about using apps or CSS and .Js files. I don't have access to Splunk app$home or I can't use any app to get this functionality due to restrictions in my team.

My goal is to get this done using Splunk query only or may be changing few lines of code in the underlining XML of the panel.

Can anybody tell me how to achieve it? Any suggestions would really appreciated.

Thank you for your time/help.

Tags (1)
0 Karma

ambujhbti
New Member

Hello,

Thank you.

My purpose is to show the state of Database,possible values are shown below:

DB_Name DBRole State

DB_1 Primary UP(Show this in GREEN color)
DB_2 StandBy UP(Show this in GREEN color)
DB_3 Primary DOWN(Show this in RED color)
DB_4 StandBy DOWN (Show this in RED color)

I can't make use of CSS as I dont' have access, moreover my team won't give me access since this is just a simple task of changing of color or values.

If you could suggest me any way of doing this using XML, it will really solve my purpose.

Thanks!

0 Karma

lguinn2
Legend

If you want to change the colors of the bars in a chart, so something similar, take a look at this answer:

Change chart bar color based on data value

The answer only uses simple XML in the dashboard.

Richfez
SplunkTrust
SplunkTrust

Hopefully this will get you on the right track.

This should link you to the Single Value Visualizations. In there is some good information on doing what you seem to want and happily enough, they're all just user-level things so they should be able to be implemented by you in a dashboard.

It's a good read - go all the way down until you hit the "Maps" section (it's not real long) to see what possibilities there are, then try a few out and play around with them.

Let us know how that works out!

0 Karma

ambujhbti
New Member

Hello,

Thank you for your guidance.

My purpose is to show the state of Database,possible values are shown below:

DB_Name DBRole State

DB_1 Primary UP(Show this in GREEN color)
DB_2 StandBy UP(Show this in GREEN color)
DB_3 Primary DOWN(Show this in RED color)
DB_4 StandBy DOWN (Show this in RED color)

I think Single Value Visualization works with Numeric values only . I tried to use 0/1 for states in hope of getting colors through Heat Maps but I don't get colors like RED for 1 and White or gray for 0. Any suggestions?

Thank you for your time!

0 Karma
Get Updates on the Splunk Community!

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...

Introducing Splunk Enterprise 9.2

WATCH HERE! Watch this Tech Talk to learn about the latest features and enhancements shipped in the new Splunk ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...