Clearly variables can be used on the right side of a comparison, but I’ve had trouble getting them to work or finding examples of them being used on the left side.
var db = 'system' var rp = 'default' var measurement = 'cpu' var field = 'usage' var crit = 3 var data = stream |from() .database(db) .retentionPolicy(rp) .measurement(measurement) .groupBy('shard', 'org') |where(lambda: isPresent(field)) |stateDuration(lambda: field < crit) .unit(1m)
In this example, field being the problematic variable. Should it be able to work that way? Variables in TICKscripts in general have been tricky, is there any documentation about what you can use where?