You can do a PromQL query like {__name__="foo|bar"} but that's messy if you 
also want to filter on different labels for metrics foo and bar.

If you're only interested in the current values of each metric, then you 
can query the /federate endpoint where you can provide the match[] 
parameter multiple times with multiple queries.
https://prometheus.io/docs/prometheus/latest/federation/#configuring-federation

e.g.

curl -g 
'prometheus:9090/federate?match[]=up&match[]={__name__=~"scrape_.*"}'

In any case, I wouldn't worry too much about inefficiency of separate 
queries. The main time taken is reading out the data and formatting it; 
whether that's done in a single query or spread over two queries isn't 
going to make much difference.  If you want to ensure that the table data 
lines up to the same instant in time, then pick an instant and provide the 
same time=xxx parameter to each separate query.

-- 
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-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/bd76547c-e534-4133-a54f-28615df90ff2o%40googlegroups.com.

Reply via email to