Reputation: 2131
We use the Consul Service Discovery mechanism to fetch a list of proxies through which we scrape certain targets. There are multiple proxies for redundancy but ultimately they all provide the exact same information.
Now we'd like have the relabeling always drop all but one (random) node returned from SD. It must not be hardcoded as the names and number of proxies can and will change.
After looking at the relabeling implementation I don't think this is possible, but maybe there is some clever hack to achieve this.
Question: Is it possible to drop all but one (random) node from Prometheus Service Discovery?
Upvotes: 0
Views: 91
Reputation: 34142
This is not possible. I'd suggest putting a load balancer of some form in front of the proxies.
Upvotes: 1