PromQL query to count how many series have {label=XYZ}
1,087 views
Skip to first unread message
John Dexter
unread,
Mar 24, 2021, 3:16:05 PM3/24/21
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Prometheus Users
I would like to count how many time-series have a given label value for a given metric.
I am looking at something like:
group by (job) (my_updates_total{job="Job123"})
It seems to work but feels a bit odd, is it right?
Julien Pivotto
unread,
Mar 24, 2021, 8:11:08 PM3/24/21
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to John Dexter, Prometheus Users
On 24 Mar 19:15, John Dexter wrote:
> I would like to count how many time-series have a given label value for a
> given metric.
>
> I am looking at something like:
> group by (job) (my_updates_total{job="Job123"})
count by (job) (my_updates_total{job="Job123"})
>
> It seems to work but feels a bit odd, is it right?
>