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
Get Updates on the Splunk Community!

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 ...

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...