I'm trying to understand how to get only unique values from prometheus
For example:
from this
cool_metic{label="foo",instance="machine1"..} 5555
cool_metic{label="foo",instance="machine2"..} 5555
cool_metic{label="bar",instance="machine3"..} 3333
cool_metic{label="foo",instance="machine4"..} 5555
cool_metic{label="bar",instance="machine5"..} 3333
cool_metic{label="xxx",instance="machine6"..} 1111
i need to get something like this
cool_metic{label="foo"..} 5555
cool_metic{label="bar"..} 3333
cool_metic{label="xxx"..} 1111
I found a page on stackoverflow
<https://stackoverflow.com/questions/53193459/prometheus-query-equivalent-to-sql-distinct>
where it is done through avg(sum(.... but it seems to me this is not the
best solution and maybe there is a more correct way to do it.
Thanks.
--
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/5cb378a8-84b0-4550-91af-bfe313541ff1%40googlegroups.com.