Struggling to display gauge with count of 5XX errors - why?

Stupid issue here, made a quick (or so I though :cry:) dashboard with a logs panel listing all the 5XX errors for a given namespace, and I wanted to add a gauge (:cry: :cry: ) with the count of errors. Fought with count, range, etc and settled for the below query

count_over_time({namespace="contour"} |~ `" 5[0-9][0-9] `[$__range])

BuuuUuuut result is this mosaic of gauge … why ?

The same

{namespace="contour"} |~ `" 5[0-9][0-9]

`
Being the query used in the logs panel, which work just fine

Hello, I think you are getting one gauge per unique set of labels. You probably need to do something similar:

sum(count_over_time({namespace="contour"} |~ `" 5[0-9][0-9] `[$__range]))

So just wrap it in sum() or sum by () ()