prometheus: docker_sd: Deduplicate containers attached to multiple networks
Proposal
I have several containers attached to multiple Docker networks (e.g. frontend, backend). At the moment docker_sd creates a scraping target for each container on all networks. As some services are only attached to one network, it’s not feasible to use relabelling to drop all containers in a certain network (or only keep those).
It would be nice if docker_sd could be configured to only use the first network, for example or find some other way to avoid duplicate targets.
About this issue
- Original URL
- State: open
- Created 6 years ago
- Reactions: 1
- Comments: 15 (14 by maintainers)
Hello from the bug scrub: please see the #10490 for latest status.
Kubernetes implementation is the way to go, but should be behind a flag if possible.
We could implement/explore with an alternative mode, like we do for kubernetes, where one target has the addresses over all the networks.
I have tagged this issue as P3.