Splunk Search

Color in a Table based on a row of numbers

mfudali
Explorer

Hi,

 

I have a Table created by:

 

eval Actor=actor |

eval "Total Time (max/avg/p50/p99)"=maxT + ", " + avgT + ", " + p50T + ", " + p99T |
eval "Thread Execution Time (max/avg/p50/p99)"=maxE + ", " + avgE + ", " + p50E + ", " + p99E |
eval "Time On Queue (max/avg/p50/p99)"=maxOnQ + ", " + avgOnQ + ", " + p50OnQ + ", " + p99OnQ |
eval "Queue Depth (max/avg/p50/p99)"=maxqUsed + ", " + avgqUsed + ", " + p50qUsed + ", " + p99qUsed |
eval "TPS (max/avg/p50/p99)"=maxTPS + ", " + avgTPS + ", " + p50TPS + ", " + p99TPS |

<!--- create a table -->
table Actor, "Total Time (max/avg/p50/p99)", "Thread Execution Time (max/avg/p50/p99)", "Time On Queue (max/avg/p50/p99)" , "Queue Depth (max/avg/p50/p99)", "TPS (max/avg/p50/p99)" |

 

Which looks like:

mfudali_0-1632925461692.png

 

I wanted to change the color of the entire cell based on the max value. Say if max value is greater than 10000, color the cell red, else some other color.

 

I've tried following: https://community.splunk.com/t5/Dashboards-Visualizations/change-the-color-of-row-based-on-cell-valu...

 

But I can't seem to get it to work with numbers. Any help is appreciated thanks!

 

Labels (1)
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

The answer you are referring to uses a case statement to set the value of color - you could change this to a simple if statement, for example, comparing maxT with 10000. You may wish to consider having different color fields e.g. colorT, colorE, etc. if you have different thresholds for your colours.

0 Karma
Get Updates on the Splunk Community!

Splunk Observability for AI

Don’t miss out on an exciting Tech Talk on Splunk Observability for AI!Discover how Splunk’s agentic AI ...

Splunk Enterprise Security 8.x: The Essential Upgrade for Threat Detection, ...

Watch On Demand the Tech Talk on November 6 at 11AM PT, and empower your SOC to reach new heights! Duration: ...

Splunk Observability as Code: From Zero to Dashboard

For the details on what Self-Service Observability and Observability as Code is, we have some awesome content ...