Hello!
I've a query that looks like so:
max by ( cluster_id, email_domain, risk ) (
subscription_labels{email_domain!~"google.com"} + on
(cluster_id) group_left(_ignore)
(0 * topk by (cluster_id) (1,
cluster_version{version=~"4.[2-9].*",type="current"}) )
)
problem is:
if a cluster is not present in cluster_version{} it will not be returned by
the query.
In other words let's assume that there's a cluster with id "123" that is
not present in cluster version (that is the query
cluster_version{cluster_id="123"} returns 0 results) and a cluster with
id="555" that has version="0.1.1" . I want the query to discard the cluster
555 and return 123 (the version is unknown in this case).
How can I achieve this?
I tried the following query:
max by ( cluster_id, email_domain, risk ) (
subscription_labels{email_domain!~"google.com"} + on
(cluster_id) group_left(_ignore)
(0 * topk by (cluster_id) (1,
cluster_version{version=~"4.[2-9].*",type="current"}) )
) *or on (cluster_id) subscription_labels*
but it returns much more records (like 40220 vs 16922) than the query:
max by ( cluster_id, email_domain, risk ) (
subscription_labels{email_domain!~"google.com"}
)
So I guess something is wrong.
Thanks for the help,
Daniele
--
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/21637260-3f68-403d-a544-97348fd060edn%40googlegroups.com.