Warning at Alert Rules

On the earliest versions of Grafana Alert Rules was working but after upgrade to version 9.4.3 I get warning message on old rules “Query not available
Cannot display the query preview. Some of the data sources used in the queries are not available.” when I try to view Query & Results.
If I recreate same classic condition on alert Rule and save it. The problem is solving. I have more than 100 rules how to fix them all ?

What is your datasource and can you share a screenshot?

Data source is InfluxDb with flux query.

Can you share query A (the Flux query)?

from(bucket: "tempHumSensors")
  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)
  |> filter(fn: (r) => r["device_name"] == "Device-2-Sensor-1")
  |> filter(fn: (r) => r["_measurement"] == "device_frmpayload_data_TempC_SHT")
  |> aggregateWindow(every: 10m, fn: last, createEmpty: false)
  |> yield(name: "last")

This is the query, but is not related with query. If I remove and add same condition the waning is disappears.

If I understand what you wrote above, you are able to resolve the issue for a single alert rule by re-creating the same classic condition and re-saving the rule, correct? And that approach would be cumbersome to repeat for over 100 alert rules, correct?

It sounds like some sort of bug caused by the upgrade process. I’d suggest you report it in Github.