I have a metric that returns a few unique values for each timeseries. (This is from Prometheus Blackbox Exporter). See example below
How can I group these by value and return a count. The following is the expected outcome
{status="400"} 1
{status="0"} 0
{status="200"} 2
Use the following PromQL:
count_values("status", probe_http_status_code)
More info in Prometheus documentation here.