The query SELECT * FROM "example" WHERE "fieldName" = 'value'
checks if the field fieldName
is equal to value
. How can I do the same in Flux?
Hello @blueoracle,
Welcome! Thanks for your question and for giving flux a try
from(bucket:"example-bucket")
|> range(start:-1h)
|> filter(fn: (r) =>
r._measurement == "cpu" and
r._field == "usage_system" and
r.cpu == "cpu-total"
)
Use the Filter function.