Unable to create alerts rule with expressions

Hi team,

While trying to create alerts with the following query expression, we are experiencing an error.

sum(count_over_time({namespace="test", stream=~".+", container =~"scheduler"} |= "failed" [12h]))

When I try to create an Alert rule I get the following error:

Failed to evaluate queries and expressions: failed to execute conditions: failed to query data: Run out of attempts while querying the server.

But when I try to run the same thing in Grafana Explore I get nice output which shows everything I need. Why can’t the same be accomplished while creating rules?

Please let me know if I need to make any modifications to the expression.

Thanks.