Is there really nothing better - more elegant and more performant - than the following type of thing? I suppose I could call Lua, but I imagine that so doing would be expensive (and I am sure how well Lua itself handles numeric ranges).
Code: Select all
IfCondition=(measure_cpu_usage <= #threshold_cpu_lowest#)
IfTrueAction=#action_cpu_usage_lowest#
IfCondition2=(measure_cpu_usage > #threshold_cpu_lowest#) && ( measure_cpu_usage <= #threshold_cpu_low# )
IfTrueAction2=#action_cpu_usage_low#
IfCondition3=(measure_cpu_usage > 34) && ( measure_cpu_usage <= #threshold_cpu_medium# )
IfTrueAction3=#action_cpu_usage_medium#
IfCondition4=(measure_cpu_usage > #threshold_cpu_medium#) && ( measure_cpu_usage <= #threshold_cpu_high# )
IfTrueAction4=#action_cpu_usage_high#
IfCondition5=(measure_cpu_usage > #threshold_cpu_high#)
IfTrueAction5=#action_cpu_usage_highest#