How Query two job

20 views
Skip to first unread message

Dudu

unread,
May 6, 2021, 3:33:12 AM5/6/21
to Prometheus Users
In order to query all metrics under a single job i'm running this : {job="job1"}

What if i want to query all metrics of 2 jobs ?

{job="job1","job2"} - This didnt do the trick 

sayf eddine Hammemi

unread,
May 6, 2021, 4:23:24 AM5/6/21
to Dudu, Prometheus Users
You cant target a list but you can craft a regex
{job=~"job(2|2)"}

--
You received this message because you are subscribed to the Google Groups "Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/240b5e5c-2125-4d29-bd70-9d319dcd5786n%40googlegroups.com.

sayf eddine Hammemi

unread,
May 6, 2021, 4:24:05 AM5/6/21
to Dudu, Prometheus Users
I meant {job=~"job(1|2)"}
Reply all
Reply to author
Forward
0 new messages