Dashboards & Visualizations

Change cell color of a dashboard table

sbolyard
Engager

Hello,
I'm trying to set up my dashboard to change the color of a cell if it has a priority of P1, P2 or P3. I have the css and javascript set up, but I think my problem is with the first two lines of the XML. The first line, I have it set up for another panel to produce icons, which works. I tried changing it to a form, but that didn't help. Can anyone help me out with this?








Server Status
index="fping_status" sourcetype="" host_status=unreachable OR host_status=alive host_name="" | stats latest(sourcetype) as "Operating System",latest(host_name) as "Host Name", latest(host_status) as "Status", latest(host_pingtime) as "Ping", latest(time) as "Last Updated" by host_name | sort -str(Status),-num(Ping),+str(host_name) |fields "Host Name",Status,"Operating System"
-3m
now
10
true
false
none
cell
180




Windows Server Statistics - Disk Space
eventtype="windows_performance" Host="*" object="LogicalDisk" counter="% Free Space" instance!="_Total" | stats sparkline(avg(Value)) as Trend , latest(Value) as Current, latest(instance) as Drive,latest(_time) as "Last Updated" by Host | convert ctime("Last Updated") | sort Current | eval Current=(100-Current) | eval Current=round(Current, 2) | eval Priority=case((Current<90 OR Current=90), "Normal", (Current>90 AND Current<95 OR Current=95), "P3",(Current>95 AND Current<98 OR Current=98), "P2", Current>98, "P1") |fields Host, Drive, Current, Priority,"Last Updated"
-5m
now

Tags (3)
0 Karma
1 Solution

MuS
Legend

martin_mueller
SplunkTrust
SplunkTrust

Why is there a <dashboard> tag inside a <form> tag?

If you're using that to include multiple script or stylesheet references, you can just plonk multiple attributes into the outer <form> tag.

MuS
Legend

Hi sbolyard ,

or you check this one http://answers.splunk.com/answers/83206/color-in-a-table-based-on-values

cheers, MuS

MuS
Legend
0 Karma

strive
Influencer
0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Thanks for the Memories! Splunk University, .conf25, and our Community

Thank you to everyone in the Splunk Community who joined us for .conf25, which kicked off with our iconic ...

Data Persistence in the OpenTelemetry Collector

This blog post is part of an ongoing series on OpenTelemetry. What happens if the OpenTelemetry collector ...

Introducing Splunk 10.0: Smarter, Faster, and More Powerful Than Ever

Now On Demand Whether you're managing complex deployments or looking to future-proof your data ...