Log errors after migrating from influxQL to flux

Hi guys,

Ever since we migrated our dashboard to Flux we seem to be getting the below warnings. Does anyone know what the issue is?

The error message seems to be coming from our alerting dashboard, not the actual check that is occuring itself.

The checks seem to be working fine.

t=2021-05-17T13:16:09+0200 lvl=warn msg=“Flux query failed” logger=tsdb.influx_flux err=“invalid: error calling function “aggregateWindow” @4:3-4:58: error calling function “window” @universe.flux|132:12-132:57: parameter “every” must be nonzero” query=“from(bucket:“eBondJMX/one_week_only”)\r\n|>range(start: 2021-05-17T11:11:09Z, stop: 2021-05-17T11:16:09Z)\r\n|>filter(fn: (r) => r._measurement == “RFQ_Mappers_jmx” and r._field ==“Result”)\r\n|>aggregateWindow(every: 0s, timeSrc: “_start”, fn: last)”

@Niikhiil1997 you can’t use an every: 0s window period with aggregateWindow(). It needs to be a duration greater than zero. I’d suggest using the v.windowPeriod variable unless you have a specific duration you’d like to aggregate by.

from(bucket:"eBondJMX/one_week_only")
  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)
  |> filter(fn: (r) => r._measurement == "RFQ_Mappers_jmx" and r._field =="Result")
  |> aggregateWindow(every: v.windowPeriod, timeSrc: "_start", fn: last)
1 Like