Flux is a lightweight scripting language for querying databases (like InfluxDB) and working with data. It's part of InfluxDB 1.7 and 2.0, but can be run independently of those.
Proposal:
use string regexp to filter metrics record, for example:
from(bucket: "tsdb_mysql")
|> range(start: 2022-08-10T06:50:00Z, stop: 2022-08-10T07:15:00Z)
|> filter(fn: (r) => (r._measurement == "mysql_global_status_queries" and r._field == "value") and r.hostname !~ /mgb-test(?!da01-dba|dp01-dba).*/)
Current behavior:
occured errror: compilation failed: error @12:117-12:266: regex parse error: mgb-test(?!da01-dba|dp01-dba).* error: look-around, including look-ahead and look-behind, is not supported
Desired behavior:
flux string regexp support look-around, including look-ahead and look-behind.
Proposal: use string regexp to filter metrics record, for example: from(bucket: "tsdb_mysql") |> range(start: 2022-08-10T06:50:00Z, stop: 2022-08-10T07:15:00Z) |> filter(fn: (r) => (r._measurement == "mysql_global_status_queries" and r._field == "value") and r.hostname !~ /mgb-test(?!da01-dba|dp01-dba).*/)
Current behavior: occured errror: compilation failed: error @12:117-12:266: regex parse error: mgb-test(?!da01-dba|dp01-dba).* error: look-around, including look-ahead and look-behind, is not supported
Desired behavior: flux string regexp support look-around, including look-ahead and look-behind.