Hi.
I have next script panel. I have saved limit values to csv. For ex. gc_perc90_standart=0.01. I need to color cell in green if value < 0.01 and red if more. But problem here - if (value > gc_perc90_standart, "#53A051", "#DC4E41")
How I should use variable within colorPalette?
<panel depends="$tok_GC_statistic$">
<title>GC statistics in seconds</title>
<table>
<search>
<query>
index="all" source="*/log/gc_log_memory.log"
| rex "Total time for which application threads were stopped:\s(?<GC_TIME_THREADS>[0-9]+\.{0,1}[0-9]*)\sseconds"
| stats count(GC_TIME_THREADS) as cntGC, perc90(GC_TIME_THREADS) as proc90GC by host
| join type=inner
[
| inputlookup gc_standarts.csv | fields gc_perc90_standart
]
| table host cntGC proc90GC gc_perc90_standart
</query>
<earliest>$TimeToken.earliest$</earliest>
<latest>$TimeToken.latest$</latest>
<sampleRatio>1</sampleRatio>
</search>
<option name="count">20</option>
<option name="drilldown">cell</option>
<format type="color" field=proc90GC >
<colorPalette type="expression">if (value > gc_perc90_standart, "#53A051", "#DC4E41")</colorPalette>
</format>
<drilldown>none</drilldown>
</table>
</panel>
... View more