Alerting in kubernetes on multi-pod data set

Grafana v9.1.2
Using Legacy alerting.
I created one alert, where i want alert when request with particular error code exceeded some limit.
My data is like following screenshot in timeseries database

Query used : sum (com_comviva_mbean_app_Counter_ApiErrorCnt_cnt{key_=“506”}) by (pod_name,key)

Alert configuration:

so when state of alert changed to [pending] for one of the pod but after time situation of that pod become normal but with in same evaluation time my another pod breach my alert condition alert will be raised.
Its not check for that pod for which state changed to pending.

the grafana devs have deprecated legacy alerting. Strongly advice you switch to the new Unified Alerting platform :heart: