On 03 Mar 11:10, Yagyansh S. Kumar wrote:
> I want to get the number of target server that I have been scraping the 
> metrics for. Can this number be dynamic? I mean if I add more servers, the 
> number should increase automatically.
> Thanks in advance!


You can get that with the PromQL query:

    count(up) by (job)

regards,



-- 
 (o-    Julien Pivotto
 //\    Open-Source Consultant
 V_/_   Inuits - https://www.inuits.eu

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/20200303191228.GA30462%40oxygen.

Attachment: signature.asc
Description: PGP signature

Reply via email to