Splunk Search

How to highlight the lowest value in a statistics table with yellow or red?

dbcase
Motivator

Hi,

I have the search below and it works great. It outputs a table with the customer name, then a trendline, and then a percentage.

earliest=-24h index=mso_statistics sourcetype=ic_connectivity_5min-too_small  stat_name=broadband |eval mso = upper(substr(mso,1,1)).lower(substr(mso,2)) |chart sparkline(avg(stat_val)) as Trend last(stat_val) as "Broadband Connectivity %" by mso|rename mso as Customer

What I'd like to do is highlight the LOWEST percentage value. I know this can be done with that stats table formatting, but Splunk uses RED for the HIGHEST value and BLUE for the LOWEST value (seems like they chose temperature colors). I'd like to highlight/identify the lowest value either with a yellow highlight (similar to the events) or RED text color.

0 Karma
1 Solution

somesoni2
Revered Legend

Have a look at the "Table Cell Highlighting" example on the "Splunk 6.x: Dashboard Example" app.

App available here: https://splunkbase.splunk.com/app/1603/

It requires custom java scripts (script includes the field name) and css to be written.

View solution in original post

0 Karma

MuS
Legend

Hi dbcase,

install the dashboard example app https://splunkbase.splunk.com/app/1603/ and have a look at the Table Element with Data Overlay examples found here:

 http://yoursplunkserver:8000/en-US/app/simple_xml_examples/simple_table_data_overlay?earliest=0&late... 

Hope this helps ...

cheers, MuS

0 Karma

dbcase
Motivator

This is the one that is part of the table formatting. It is in the right ballpark but not quite. For the high value it uses the color RED which in this case is misleading. I'd like the LOW value to be RED so it will draw attention

0 Karma

somesoni2
Revered Legend

Have a look at the "Table Cell Highlighting" example on the "Splunk 6.x: Dashboard Example" app.

App available here: https://splunkbase.splunk.com/app/1603/

It requires custom java scripts (script includes the field name) and css to be written.

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!

Tech Talk Recap | Mastering Threat Hunting

Mastering Threat HuntingDive into the world of threat hunting, exploring the key differences between ...

Observability for AI Applications: Troubleshooting Latency

If you’re working with proprietary company data, you’re probably going to have a locally hosted LLM or many ...

Splunk AI Assistant for SPL vs. ChatGPT: Which One is Better?

In the age of AI, every tool promises to make our lives easier. From summarizing content to writing code, ...