Dashboards & Visualizations

Change the color of row based on time of the event occurrence

simon21
Path Finder

I have a Value field that shows the temperature values. The moment the value is lower than 19 degree, it row in the table should turn yellow. For the first 10 mins of the event occurrence, it should remain yellow, during the 11th min, it should turn red. Is there any timer or countdown I can set to monitor the timestamp from first occurrence of the value drop and then when it is hitting the 11th min, it can turn the color to red.

Please assist.
Thanks in advance.

0 Karma

renjith_nair
Legend

@simon21,

You could do it by using combination of search and conditional formatting.

index="your index" |fields _time,temperature|eval diff=((now()-_time)/60)|eval status_code=case(temperature <19 AND diff>10,2,temperature <19 ,1,true(),0)

In the status_code you get
0 - normal
1 - yellow
2 - red
Based on the status_code you could set the conditional formatting. Splunk by default supports color change of a column based on column value but if you want entire row to be changed, you need to use css and js as mentioned below in one of my previous answers : https://answers.splunk.com/answers/670546/how-to-change-color-of-entire-row-based-on-field-v.html

---
What goes around comes around. If it helps, hit it with Karma 🙂
0 Karma

niketn
Legend

@renjith.nair, can you move your answer to the following question as this is a duplicate?

https://answers.splunk.com/answers/674451/how-to-change-the-color-of-row-based-on-time-of-th.html

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Community Content Calendar, September edition

Welcome to another insightful post from our Community Content Calendar! We're thrilled to continue bringing ...

Splunkbase Unveils New App Listing Management Public Preview

Splunkbase Unveils New App Listing Management Public PreviewWe're thrilled to announce the public preview of ...

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...