We are using Docker Swarm Service Discovery to find Prometheus targets. With help of an old post we managed to overwrite the port of the discovered targets when we add a prometheus-port label to the service (https://groups.google.com/g/prometheus-users/c/4Hr4e4vaVMQ).
Our problem is Traefik, the image exposes two ports (80, 443), but not the Prometheus port 8082. I can overwrite the port with a label now, but service discovery created two targets for Prometheus already. Is it possible to use relabelling to remove a target that is discovered twice, make the targets unique/distinct? First dockerswarm_sd_configs delivers the two targets with same host and different port, after the port relabel step both targets have the same __address__. The log is filling up fast with messages stating "skipping duplicate scrape target with identical labels", I would like to avoid that by just removing the duplicate scrape targets. -- 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/2e394246-24a6-4608-ab0c-3f678c52408cn%40googlegroups.com.

