Grafana v8.1.2 (103f8fa094) Alert Always Pending

Hi @prabhat8ranjan,
He wanted to say that you should never put metrics into labels (check label Value in his last picture) because they change at every alert evaluation interval (based on query). Every time metric in label changes grafana creates new alert and starts to monitor it. At next evaluation Value label will probably have different metric (e.g. Value=85.12345 ) value (which would start new alert in pending if threshold is met) and then previous alert (with let’s say Value=83.6788) would be closed as Normal(missingSeries) because there is no anymore alert with that specific label (Value=83.6788).

You can solve that problem by moving metrics from labels to annotations like on next picture.

Bonus:
You can round up metrics to whole numbers :

{{ printf "%.0f" $values.B.Value }}

or specific number of decimals with:

{{ printf "%.2f" $values.B.Value }}

Best regards,
ldrascic