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.
Need some effort in JavaScript and css
http://dev.splunk.com/view/webframework-codeexamples/SP-CAAAE49
Please help yourself
@simon21, if you just want to color the table cell color with temperature Value, from Splunk 6.5
onward you can do it directly by editing the Visualization from UI. Refer to documentation: https://docs.splunk.com/Documentation/Splunk/latest/Viz/TableFormatsFormatting#Column_color
If you want to color the entire row you will have to use Simple XML JS Extension
along with CSS Extension
. You can get Splunk Dashboard Examples app with Table Row Highlighting
example.
If you are on Splunk 6.6
or higher, you might have to add setTimeout()
function as explained in the following answer: https://answers.splunk.com/answers/614788/splunk-dashboard-examples-table-row-highlighting-b.html
hi @simon
we cann't add colors using queries ,
my idea is -- create one shot query and saved result in a variable like
|eval color=if (value<=19 and duration <=10 ,"Yellow","Red") |return $result.color
Than add this results at cs part
#id.background-color=$variablename$
Hello,
Thanks everyone for the responses.
But this doesnt solve my problem...
I have real time data coming in.
For eg: the Value of temp at 12:00pm (now) is 18 degree, which means the value row in the table would turn yellow, and a timer starts till 10 mins if the value of temp doesnt change (meaning it stays below 19 degree), then the row color should change to red.. in case the value of temp rises to 20 at the 3rd min, it should not go to red .. it is a countdown kind of situation that would help me. Can we do that on splunk?